summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--R/predict.R11
-rw-r--r--man/compare.Rd4
-rw-r--r--man/predict.estpoly.Rd7
3 files changed, 14 insertions, 8 deletions
diff --git a/R/predict.R b/R/predict.R
index 3091a82..67ed8d0 100644
--- a/R/predict.R
+++ b/R/predict.R
@@ -52,9 +52,10 @@ polyinv <- function(x,k){
#'
#' @examples
#' data(arxsim)
-#' Yhat <- predict(mod1,data) # 1-step ahead predictions
-#' Yhat_2 <- predict(mod1,data,nahead=2) # 2-step ahead predictions
-#' Yhat_inf <- predict(mod1,data,nahead=Inf) # Infinite-step ahead predictions
+#' mod1 <- oe(arxsim,c(2,1,1))
+#' Yhat <- predict(mod1,arxsim) # 1-step ahead predictions
+#' Yhat_2 <- predict(mod1,arxsim,nahead=2) # 2-step ahead predictions
+#' Yhat_inf <- predict(mod1,arxsim,nahead=Inf) # Infinite-step ahead predictions
#'
#' @references
#' Arun K. Tangirala (2015), \emph{Principles of System Identification: Theory
@@ -89,7 +90,9 @@ predict.estpoly <- function(x,newdata=NULL,nahead=1){
#'
#' @examples
#' data(arxsim)
-#' compare(data,nahead=Inf,mod1,mod2,mod3)
+#' mod1 <- arx(arxsim,c(1,2,2))
+#' mod2 <- oe(arxsim,c(2,1,1))
+#' compare(arxsim,nahead=Inf,mod1,mod2)
#'
#' @seealso \code{\link{predict.estpoly}} for obtaining model predictions
#' @import ggplot2 reshape2
diff --git a/man/compare.Rd b/man/compare.Rd
index 28e91c7..3700f0a 100644
--- a/man/compare.Rd
+++ b/man/compare.Rd
@@ -20,7 +20,9 @@ data, for comparison.
}
\examples{
data(arxsim)
-compare(data,nahead=Inf,mod1,mod2,mod3)
+mod1 <- arx(arxsim,c(1,2,2))
+mod2 <- oe(arxsim,c(2,1,1))
+compare(arxsim,nahead=Inf,mod1,mod2)
}
\seealso{
diff --git a/man/predict.estpoly.Rd b/man/predict.estpoly.Rd
index 511ed71..4c19ed5 100644
--- a/man/predict.estpoly.Rd
+++ b/man/predict.estpoly.Rd
@@ -23,9 +23,10 @@ Predicts the output of an identified model (\code{estpoly}) object K steps ahead
}
\examples{
data(arxsim)
-Yhat <- predict(mod1,data) # 1-step ahead predictions
-Yhat_2 <- predict(mod1,data,nahead=2) # 2-step ahead predictions
-Yhat_inf <- predict(mod1,data,nahead=Inf) # Infinite-step ahead predictions
+mod1 <- oe(arxsim,c(2,1,1))
+Yhat <- predict(mod1,arxsim) # 1-step ahead predictions
+Yhat_2 <- predict(mod1,arxsim,nahead=2) # 2-step ahead predictions
+Yhat_inf <- predict(mod1,arxsim,nahead=Inf) # Infinite-step ahead predictions
}
\references{