diff options
author | Suraj Yerramilli | 2015-06-06 01:03:51 +0530 |
---|---|---|
committer | Suraj Yerramilli | 2015-06-06 01:03:51 +0530 |
commit | 770703a5e180ed20a74dc97d4e7a973bc4febe95 (patch) | |
tree | 81b9a3059e379f2326a21dfb054d40a71b83e9f7 /R | |
parent | b51c0f543934e4bff2788409af3a13584b710f1c (diff) | |
download | SysID-R-code-770703a5e180ed20a74dc97d4e7a973bc4febe95.tar.gz SysID-R-code-770703a5e180ed20a74dc97d4e7a973bc4febe95.tar.bz2 SysID-R-code-770703a5e180ed20a74dc97d4e7a973bc4febe95.zip |
Added predict method for the estimated ARX method
Diffstat (limited to 'R')
-rw-r--r-- | R/estpoly.R | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/R/estpoly.R b/R/estpoly.R index b0e127b..70e98b2 100644 --- a/R/estpoly.R +++ b/R/estpoly.R @@ -30,6 +30,15 @@ estARX <- function(data,order=c(0,1,0)){ } #' @export +predict.estARX <- function(model,newdata=NULL){ + if(is.null(newdata)){ + return(fitted(model)) + } else{ + return(sim(coef(model),newdata)) + } +} + +#' @export summary.estARX <- function(object) { coefs <- c(coef(object)$A[-1],coef(object)$B) |