summaryrefslogtreecommitdiff
path: root/R/estUtil.R
diff options
context:
space:
mode:
authorSuraj Yerramilli2016-03-15 12:33:11 +0530
committerSuraj Yerramilli2016-03-15 12:33:11 +0530
commit1220070d23dfbcd0ddea6a3931fe61bacaa7746d (patch)
tree6ed9cfa0ceaa6ea82be25761cb4efc016d020c4c /R/estUtil.R
parent8666bae8c6d949eeab0676021bf37363b6698e1b (diff)
downloadSysID-R-code-1220070d23dfbcd0ddea6a3931fe61bacaa7746d.tar.gz
SysID-R-code-1220070d23dfbcd0ddea6a3931fe61bacaa7746d.tar.bz2
SysID-R-code-1220070d23dfbcd0ddea6a3931fe61bacaa7746d.zip
minor corrections in bj routine
Diffstat (limited to 'R/estUtil.R')
-rw-r--r--R/estUtil.R8
1 files changed, 4 insertions, 4 deletions
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]))