summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--R/estpoly.R10
-rw-r--r--man/oe.Rd9
2 files changed, 12 insertions, 7 deletions
diff --git a/R/estpoly.R b/R/estpoly.R
index 3a0c7c8..7d27cf8 100644
--- a/R/estpoly.R
+++ b/R/estpoly.R
@@ -74,8 +74,8 @@ plot.estpoly <- function(model,newdata=NULL){
require(ggplot2)
if(is.null(newdata)){
- ypred <- fitted(model)
- yact <- fitted(model) + resid(model)
+ ypred <- ts(fitted(model),names="Predicted")
+ yact <- ts(fitted(model) + resid(model),names="Actual")
time <- time(model$input)
titstr <- "Predictions of Model on Training Set"
} else{
@@ -292,6 +292,8 @@ armax <- function(x,order=c(0,1,1,0),options=optimOptions()){
#' @param order: Specification of the orders: the four integer components
#' (nb,nf,nk) are order of polynomial B + 1, order of the polynomial F,
#' and the input-output delay respectively
+#' @param options Estimation Options, setup using
+#' \code{\link{optimOptions}}
#'
#' @details
#' SISO OE models are of the form
@@ -341,8 +343,8 @@ armax <- function(x,order=c(0,1,1,0),options=optimOptions()){
#' @examples
#' data(oesim)
#' z <- dataSlice(data,end=1533) # training set
-#' mod_oe <- oe(z,c(2,1,2))
-#' summary(mod_oe) # obtain estimates and their covariances
+#' mod_oe <- oe(z,c(2,1,2),optimOptions(tol=1e-04,LMinit=0.01))
+#' mod_oe
#' plot(mod_oe) # plot the predicted and actual responses
#'
#' @export
diff --git a/man/oe.Rd b/man/oe.Rd
index 314adc6..eee4839 100644
--- a/man/oe.Rd
+++ b/man/oe.Rd
@@ -4,11 +4,14 @@
\alias{oe}
\title{Estimate Output-Error Models}
\usage{
-oe(x, order = c(1, 1, 0))
+oe(x, order = c(1, 1, 0), options = optimOptions())
}
\arguments{
\item{x}{an object of class \code{idframe}}
+\item{options}{Estimation Options, setup using
+\code{\link{optimOptions}}}
+
\item{order:}{Specification of the orders: the four integer components
(nb,nf,nk) are order of polynomial B + 1, order of the polynomial F,
and the input-output delay respectively}
@@ -58,8 +61,8 @@ using the \code{\link{detrend}} function.
\examples{
data(oesim)
z <- dataSlice(data,end=1533) # training set
-mod_oe <- oe(z,c(2,1,2))
-summary(mod_oe) # obtain estimates and their covariances
+mod_oe <- oe(z,c(2,1,2),optimOptions(tol=1e-04,LMinit=0.01))
+mod_oe
plot(mod_oe) # plot the predicted and actual responses
}
\references{