summaryrefslogtreecommitdiff
path: root/R/estUtil.R
diff options
context:
space:
mode:
authorSuraj Yerramilli2016-02-12 13:32:24 +0530
committerSuraj Yerramilli2016-02-12 13:32:24 +0530
commit4ea181410b17ac2cd2d99fa686651f19d747a192 (patch)
tree3f1b34efd431f9aea35b527bb23c2c579733a881 /R/estUtil.R
parent9f8588f539178b9eb42235b9b131702534e42c49 (diff)
downloadSysID-R-code-4ea181410b17ac2cd2d99fa686651f19d747a192.tar.gz
SysID-R-code-4ea181410b17ac2cd2d99fa686651f19d747a192.tar.bz2
SysID-R-code-4ea181410b17ac2cd2d99fa686651f19d747a192.zip
minor corrections
Diffstat (limited to 'R/estUtil.R')
-rw-r--r--R/estUtil.R4
1 files changed, 2 insertions, 2 deletions
diff --git a/R/estUtil.R b/R/estUtil.R
index 989b910..a526d4d 100644
--- a/R/estUtil.R
+++ b/R/estUtil.R
@@ -17,7 +17,6 @@ levbmqdt <- function(...,obj,theta0,N,opt){
update <- 1
# variable to count the number of times objective function is called
countObj <- 0
- sumSqDiff <- 1
repeat{
i=i+1
@@ -32,6 +31,7 @@ levbmqdt <- function(...,obj,theta0,N,opt){
termPar <- norm(g,"2")/sumsq0/100
if(termPar < tol) break
+
# Evaulate sum square error
fn <- l$Y-l$X%*%theta
sumsq <- sum(fn^2)
@@ -53,7 +53,7 @@ levbmqdt <- function(...,obj,theta0,N,opt){
}
}
- if(termPar < tol)||(i == maxIter)) break
+ if((termPar < tol)||(i == maxIter)) break
}
if(termPar < tol){