summaryrefslogtreecommitdiff
path: root/R
diff options
context:
space:
mode:
Diffstat (limited to 'R')
-rw-r--r--R/estpoly.R6
1 files changed, 3 insertions, 3 deletions
diff --git a/R/estpoly.R b/R/estpoly.R
index 9a52552..d951ad5 100644
--- a/R/estpoly.R
+++ b/R/estpoly.R
@@ -345,12 +345,12 @@ 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))
+ mod_arx <- iv4(x,c(nf,nb,nk)) # fitting ARX model
+ ivs <- 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,
+ l <- levbmqdt(y,uout,order,ivs,obj=oeGrad,theta0=theta0,N=N,
opt=options)
theta <- l$params
e <- ts(l$residuals,start = start(y),deltat = deltat(y))