summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSuraj Yerramilli2016-03-15 16:43:52 +0530
committerSuraj Yerramilli2016-03-15 16:43:52 +0530
commit72844ed965f645357664919f0803e25d75623ab7 (patch)
tree4a8b068aeb739973966227db73ea10d92a7f5b31
parent1220070d23dfbcd0ddea6a3931fe61bacaa7746d (diff)
downloadSysID-R-code-72844ed965f645357664919f0803e25d75623ab7.tar.gz
SysID-R-code-72844ed965f645357664919f0803e25d75623ab7.tar.bz2
SysID-R-code-72844ed965f645357664919f0803e25d75623ab7.zip
minor changes
-rw-r--r--R/estUtil.R3
1 files changed, 1 insertions, 2 deletions
diff --git a/R/estUtil.R b/R/estUtil.R
index 676adb5..043eadc 100644
--- a/R/estUtil.R
+++ b/R/estUtil.R
@@ -12,7 +12,7 @@ levbmqdt <- function(...,obj,theta0,N,opt){
i <- 0
l <- obj(theta=theta0,e=NULL,dots)
e <- l$e; grad <- l$grad
- sumsq0 <- sum(l$fn^2)/df
+ sumsq0 <- sum(e^2)/df
# variable to count the number of times objective function is called
countObj <- 0
@@ -68,7 +68,6 @@ levbmqdt <- function(...,obj,theta0,N,opt){
}
}
# theta <- theta0
- e <- l$fn
sigma2 <- sum(e^2)/df
vcov <- 1/df*Hinv*sigma2