summaryrefslogtreecommitdiff
path: root/R
diff options
context:
space:
mode:
Diffstat (limited to 'R')
-rw-r--r--R/estpoly.R9
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)