summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--R/estpoly.R9
-rw-r--r--data/armaxsim.RDatabin0 -> 20192 bytes
-rw-r--r--man/armax.Rd9
3 files changed, 10 insertions, 8 deletions
diff --git a/R/estpoly.R b/R/estpoly.R
index 958debb..c1a166f 100644
--- a/R/estpoly.R
+++ b/R/estpoly.R
@@ -239,10 +239,11 @@ arx <- function(x,order=c(0,1,0)){
#' Theory and Practice}, CRC Press, Boca Raton. Sections 14.4.1, 21.6.2
#'
#' @examples
-#' data(arxsim)
-#' model <- armax(data,c(1,2,1,2))
-#' summary(model) # obtain estimates and their covariances
-#' plot(model) # plot the predicted and actual responses
+#' data(armaxsim)
+#' z <- dataSlice(data,end=1533) # training set
+#' mod_armax <- armax(z,c(1,2,1,2))
+#' summary(mod_armax) # obtain estimates and their covariances
+#' plot(mod_armax) # plot the predicted and actual responses
#'
#' @export
armax <- function(x,order=c(0,1,1,0)){
diff --git a/data/armaxsim.RData b/data/armaxsim.RData
new file mode 100644
index 0000000..d6a17d4
--- /dev/null
+++ b/data/armaxsim.RData
Binary files differ
diff --git a/man/armax.Rd b/man/armax.Rd
index 56cc18b..06bc17f 100644
--- a/man/armax.Rd
+++ b/man/armax.Rd
@@ -47,10 +47,11 @@ The data is expected to have no offsets or trends. They can be removed
using the \code{\link{detrend}} function.
}
\examples{
-data(arxsim)
-model <- armax(data,c(1,2,1,2))
-summary(model) # obtain estimates and their covariances
-plot(model) # plot the predicted and actual responses
+data(armaxsim)
+z <- dataSlice(data,end=1533) # training set
+mod_armax <- armax(z,c(1,2,1,2))
+summary(mod_armax) # obtain estimates and their covariances
+plot(mod_armax) # plot the predicted and actual responses
}
\references{
Arun K. Tangirala (2015), \emph{Principles of System Identification: