summaryrefslogtreecommitdiff
path: root/R
diff options
context:
space:
mode:
authorSuraj Yerramilli2015-11-01 17:06:09 +0530
committerSuraj Yerramilli2015-11-01 17:06:09 +0530
commitb2b13b684a15329f6d0488dbe82bc95d57cd98e7 (patch)
tree95ecdecb7e537b9aea27b16ef8890535eee3870c /R
parentfcead7522039841bac1027237c5bc8c1f3ed6b45 (diff)
downloadSysID-R-code-b2b13b684a15329f6d0488dbe82bc95d57cd98e7.tar.gz
SysID-R-code-b2b13b684a15329f6d0488dbe82bc95d57cd98e7.tar.bz2
SysID-R-code-b2b13b684a15329f6d0488dbe82bc95d57cd98e7.zip
Correcting DoF
Diffstat (limited to 'R')
-rw-r--r--R/estpoly.R2
1 files changed, 1 insertions, 1 deletions
diff --git a/R/estpoly.R b/R/estpoly.R
index d333338..c779f66 100644
--- a/R/estpoly.R
+++ b/R/estpoly.R
@@ -251,7 +251,7 @@ armax <- function(x,order=c(0,1,1,0)){
require(MASS)
y <- outputData(x); u <- inputData(x); N <- dim(y)[1]
na <- order[1];nb <- order[2]; nc <- order[3]; nk <- order[4]
- nb1 <- nb+nk-1 ; n <- max(na,nb1,nc); df <- N - na + nb + nc
+ nb1 <- nb+nk-1 ; n <- max(na,nb1,nc); df <- N - na - nb - nc
if(nc<1)
stop("Error: Not an ARMAX model")