summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--R/estpoly.R2
1 files changed, 1 insertions, 1 deletions
diff --git a/R/estpoly.R b/R/estpoly.R
index 9fc5964..a895525 100644
--- a/R/estpoly.R
+++ b/R/estpoly.R
@@ -5,7 +5,7 @@ estARX <- function(data,order=c(0,1,0)){
y <- as.matrix(data$output)
u <- as.matrix(data$input); N <- dim(y)[1]
na <- order[1];nb <- order[2]; nk <- order[3]
- nb1 <- nb+nk; n <- max(na,nb1); df <- N - n
+ nb1 <- nb+nk; n <- max(na,nb1); df <- N - na - nb -nk
padZeros <- function(x,n) c(rep(0,n),x,rep(0,n))
yout <- apply(y,2,padZeros,n=n);