diff options
author | Suraj Yerramilli | 2015-06-05 23:56:03 +0530 |
---|---|---|
committer | Suraj Yerramilli | 2015-06-05 23:56:03 +0530 |
commit | 6771e27e52fbf687260d8df3bb3c8613352bc0d4 (patch) | |
tree | a923d04d9e8dd7c51b6014c6555ce1b6a15ce3b0 /R | |
parent | 34ab380cfc2fd9a25f2de2ee51de7cab9f92e1aa (diff) | |
download | SysID-R-code-6771e27e52fbf687260d8df3bb3c8613352bc0d4.tar.gz SysID-R-code-6771e27e52fbf687260d8df3bb3c8613352bc0d4.tar.bz2 SysID-R-code-6771e27e52fbf687260d8df3bb3c8613352bc0d4.zip |
Added a print method for the summary of estARX
Diffstat (limited to 'R')
-rw-r--r-- | R/estpoly.R | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/R/estpoly.R b/R/estpoly.R index ebd266c..b3e31c3 100644 --- a/R/estpoly.R +++ b/R/estpoly.R @@ -43,12 +43,22 @@ summary.estARX <- function(object) nb <- length(coef(object)$B) - nk rownames(TAB) <- rep("a",nrow(TAB)) - for(i in 1:na) rownames(TAB)[i] <- paste("a.",i,sep="") + for(i in 1:na) rownames(TAB)[i] <- paste("a",i,sep="") for(j in (na+1):nrow(TAB)) { - rownames(TAB)[j] <- paste("b.",j-na-1+nk,sep="") + rownames(TAB)[j] <- paste("b",j-na-1+nk,sep="") } - - res <- list(call=object$call,coefficients=TAB,model=coef(object)) + res <- list(call=object$call,coefficients=TAB,sigma=object$sigma, + df=object$df) class(res) <- "summary.estARX" res +} + +#' @export +print.summary.estARX <- function(object){ + cat("Discrete-time ARX model: A(q^{-1})y[k] = B(q^{-1})u[k] + e[k] \n") + cat("Call: ");print(object$call);cat("\n\n") + + print(coef(object)) + cat(paste("\nsigma:",format(object$sigma,digits=4))) + cat(paste("\nDoF:",object$df)) }
\ No newline at end of file |