diff options
Diffstat (limited to 'R/estpoly.R')
-rw-r--r-- | R/estpoly.R | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/R/estpoly.R b/R/estpoly.R index 2648ff3..76686e4 100644 --- a/R/estpoly.R +++ b/R/estpoly.R @@ -455,7 +455,8 @@ bj <- function(z,order=c(1,1,1,1,0), mod_oe <- oe(z,c(nb,nf,nk)) v <- resid(mod_oe); zeta <- matrix(predict(mod_oe)) mod_arma <- arima(v,order=c(nd,0,nc),include.mean = F) - theta0 <- matrix(c(mod_oe$sys$B,coef(mod_arma)[nd+1:nc], + C_params <- if(nc==0) NULL else coef(mod_arma)[nd+1:nc] + theta0 <- matrix(c(mod_oe$sys$B,C_params, -coef(mod_arma)[1:nd],mod_oe$sys$F1[-1])) eps <- matrix(resid(mod_arma)) |