From 1220070d23dfbcd0ddea6a3931fe61bacaa7746d Mon Sep 17 00:00:00 2001 From: Suraj Yerramilli Date: Tue, 15 Mar 2016 12:33:11 +0530 Subject: minor corrections in bj routine --- R/estUtil.R | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'R') diff --git a/R/estUtil.R b/R/estUtil.R index 20dae94..676adb5 100644 --- a/R/estUtil.R +++ b/R/estUtil.R @@ -174,14 +174,14 @@ oeGrad <- function(theta,e,dots){ bjGrad <- function(theta,e,dots){ y <- dots[[1]]; u <- dots[[2]]; order <- dots[[3]]; nb <- order[1];nc <- order[2]; nd <- order[3]; - nf <- order[4]; nk <- order[5]; - nb1 <- nb+nk-1 ; n <- max(nb1,nc,nd,nf); + nf <- order[4]; nk <- order[5];nb1 <- nb+nk-1 ; n <- max(nb1,nc,nd,nf); N <- dim(y)[1] - + + l <- list() if(is.null(e)){ zeta <- dots[[4]] w <- y-zeta - e <- dots[[5]] + e <- dots[[5]]; l$e <- e } else{ filt_ts <- signal::Arma(b=c(1,theta[nb+1:nc]), a=c(1,theta[nb+nc+1:nd])) -- cgit