diff options
author | Suraj Yerramilli | 2015-10-30 21:20:59 +0530 |
---|---|---|
committer | Suraj Yerramilli | 2015-10-30 21:20:59 +0530 |
commit | 361456717ba2c2e1fb75c48669428580a8b0c8c6 (patch) | |
tree | f13c554e0bdd7495b2b262f52c380fcefa9efa1c | |
parent | bd9241669649b2a59c89fad97c5bb612a05f5618 (diff) | |
download | SysID-R-code-361456717ba2c2e1fb75c48669428580a8b0c8c6.tar.gz SysID-R-code-361456717ba2c2e1fb75c48669428580a8b0c8c6.tar.bz2 SysID-R-code-361456717ba2c2e1fb75c48669428580a8b0c8c6.zip |
Writing ARMAX code
-rw-r--r-- | R/estpoly.R | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/R/estpoly.R b/R/estpoly.R index cfb4390..92647cd 100644 --- a/R/estpoly.R +++ b/R/estpoly.R @@ -175,4 +175,16 @@ arx <- function(x,order=c(0,1,0)){ estPoly(coefficients = model,vcov = vcov, sigma = sqrt(sigma2), df = df,fitted.values=(X%*%coef)[1:N,], residuals=(Y-X%*%coef)[1:N,],call=match.call(),input=u) +} + +armax <- function(x,order=c(0,1,1,0)){ + y <- outputData(x); u <- inputData(x); N <- dim(y)[1] + e <- matrix(rep(0,N),ncol=1) + na <- order[1];nb <- order[2]-1; nc <- order[3] + nb1 <- nb+nk ; n <- max(na,nb1,nc) + + if(nc<1) + stop("Error: Not an ARMAX model") + + }
\ No newline at end of file |