diff options
author | Suraj Yerramilli | 2016-03-15 10:24:49 +0530 |
---|---|---|
committer | Suraj Yerramilli | 2016-03-15 10:24:49 +0530 |
commit | 43d9911b7149d01ff4776c2555a5f63a0b5dafb1 (patch) | |
tree | fffb555afb193ec02836da58b92e0ee0129f38a2 | |
parent | ed1a01a9154e4ff5eaf3c8cf422d04ed4cfa1ea3 (diff) | |
download | SysID-R-code-43d9911b7149d01ff4776c2555a5f63a0b5dafb1.tar.gz SysID-R-code-43d9911b7149d01ff4776c2555a5f63a0b5dafb1.tar.bz2 SysID-R-code-43d9911b7149d01ff4776c2555a5f63a0b5dafb1.zip |
changing to stats filter
-rw-r--r-- | R/estpoly.R | 6 |
1 files 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])) } |