summaryrefslogtreecommitdiff
path: root/R
diff options
context:
space:
mode:
authorSuraj Yerramilli2016-02-10 13:25:13 +0530
committerSuraj Yerramilli2016-02-10 13:25:13 +0530
commit1b061d75ced7c189eb9ffadf99c3973749a4e066 (patch)
tree3eed7d05f8a389ca4e5f655e54109f768e56ad3f /R
parent483bd07eb2b1f83e1e1428007a8678793e4d7e4b (diff)
downloadSysID-R-code-1b061d75ced7c189eb9ffadf99c3973749a4e066.tar.gz
SysID-R-code-1b061d75ced7c189eb9ffadf99c3973749a4e066.tar.bz2
SysID-R-code-1b061d75ced7c189eb9ffadf99c3973749a4e066.zip
reverting code deletion in oe routine
Diffstat (limited to 'R')
-rw-r--r--R/estpoly.R4
1 files changed, 3 insertions, 1 deletions
diff --git a/R/estpoly.R b/R/estpoly.R
index a1faff9..dd422c4 100644
--- a/R/estpoly.R
+++ b/R/estpoly.R
@@ -340,9 +340,11 @@ oe <- function(x,order=c(1,1,0),options=optimOptions()){
stop("Not an OE model")
leftPadZeros <- function(x,n) c(rep(0,n),x)
+ mod_arx <- arx(x,c(nf,nb,nk)) # fitting ARX model
+ iv <- matrix(predict(mod_arx))
+ theta0 <- matrix(c(mod_arx$sys$B,mod_arx$sys$A[-1]))
uout <- apply(u,2,leftPadZeros,n=n)
-
l <- levbmqdt(y,uout,order,iv,obj=oeGrad,theta0=theta0,N=N,
opt=options)
theta <- l$params