diff options
Diffstat (limited to 'R/estUtil.R')
-rw-r--r-- | R/estUtil.R | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/R/estUtil.R b/R/estUtil.R index 21e132f..f6f5619 100644 --- a/R/estUtil.R +++ b/R/estUtil.R @@ -31,8 +31,8 @@ levbmqdt <- function(...,obj,theta0,N,opt){ theta <- theta0 + Hinv%*%g # Update residuals - e <- l$Y-l$X%*%theta - sumsq <- sum(e^2) + fn <- l$Y-l$X%*%theta + sumsq <- sum(fn^2) sumSqDiff <- sumsq0-sumsq countObj <- countObj + 1 @@ -44,6 +44,7 @@ levbmqdt <- function(...,obj,theta0,N,opt){ d <- d/mu theta0 <- theta sumsq0 <- sumsq + e <- fn break } else{ # increase damping coefficient by a factor of mu d <- d*mu |