From 43d9911b7149d01ff4776c2555a5f63a0b5dafb1 Mon Sep 17 00:00:00 2001 From: Suraj Yerramilli Date: Tue, 15 Mar 2016 10:24:49 +0530 Subject: changing to stats filter --- R/estpoly.R | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/R/estpoly.R b/R/estpoly.R index 08812ce..98d6eed 100644 --- a/R/estpoly.R +++ b/R/estpoly.R @@ -359,8 +359,10 @@ oe <- function(x,order=c(1,1,0),init_sys=NULL,options=optimOptions()){ # Initial Model mod_arx <- iv(x,c(nf,nb,nk)) # fitting ARX model wk <- resid(mod_arx) - e_init <- as.numeric(signal::filter( - signal::Arma(b=1,a=mod_arx$sys$A),wk)) +# e_init <- as.numeric(signal::filter( +# signal::Arma(b=1,a=mod_arx$sys$A),wk)) + e_init <- as.numeric(stats::filter(wk,filter=-mod_arx$sys$A[-1], + method = "recursive")) ivs <- y-e_init theta0 <- matrix(c(mod_arx$sys$B,mod_arx$sys$A[-1])) } -- cgit