From b2b13b684a15329f6d0488dbe82bc95d57cd98e7 Mon Sep 17 00:00:00 2001
From: Suraj Yerramilli
Date: Sun, 1 Nov 2015 17:06:09 +0530
Subject: Correcting DoF

---
 R/estpoly.R | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'R')

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")
-- 
cgit