diff options
author | ashwinrcs | 2015-12-30 16:19:12 +0530 |
---|---|---|
committer | ashwinrcs | 2015-12-30 16:19:12 +0530 |
commit | a6288c34f0a76b1cb47b443f01cde075f6a221a4 (patch) | |
tree | df41bfdceb031af8eb37dbafde09622797c68982 | |
parent | 9f5b959883015567e07dca6261f5d3deb4053677 (diff) | |
parent | 8d657cc8489fe4360a129cb931b343c28a19033d (diff) | |
download | SysID-R-code-a6288c34f0a76b1cb47b443f01cde075f6a221a4.tar.gz SysID-R-code-a6288c34f0a76b1cb47b443f01cde075f6a221a4.tar.bz2 SysID-R-code-a6288c34f0a76b1cb47b443f01cde075f6a221a4.zip |
Merge branch 'master' of https://github.com/surajy123/R-sysid
-rw-r--r-- | R/estpoly.R | 10 | ||||
-rw-r--r-- | man/oe.Rd | 9 |
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 @@ -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{ |