nlar methods {tsDyn}R Documentation

nlar methods

Description

Generic ‘nlar’ methods

Usage

## S3 method for class 'nlar':
AIC(object, ...)
## S3 method for class 'nlar':
coef(object, ...)
## S3 method for class 'nlar':
fitted(object, ...)
## S3 method for class 'nlar':
MAPE(object, ...)
## S3 method for class 'nlar':
mse(object, ...)
## S3 method for class 'nlar':
print(x, digits = max(3, getOption("digits") - 3), ...)
## S3 method for class 'nlar':
residuals(object, ...)
## S3 method for class 'nlar':
summary(object, ...)
## S3 method for class 'nlar':
plot(x, ask=interactive(), ...)
## S3 method for class 'nlar':
predict(object, newdata, n.ahead, simulate=FALSE, ...)
## S3 method for class 'nlar':
toLatex(object, ...)

Arguments

x, object fitted ‘nlar’ object
newdata data to which to apply the prediction
n.ahead number of steps ahead at which to predict
simulate if TRUE, new observations are simulated from underlying Data Generating Process
ask graphical option. See par
digits See printCoefmat
... further arguments to be passed to and from other methods

Details

MAPE
Mean Absolute Percent Error
mse
Mean Square Error
plot
Diagnostic plots
predict
Model predictions. For n.ahead>1, the model is simply iterated on generated data

Author(s)

Antonio, Fabio Di Narzo

See Also

availableModels for listing all currently available models.

Examples

x <- log10(lynx)
mod.setar <- setar(x, m=2, thDelay=1, th=3.25)
mod.setar
AIC(mod.setar)
mse(mod.setar)
MAPE(mod.setar)
coef(mod.setar)
summary(mod.setar)

e <- residuals(mod.setar)
e <- e[!is.na(e)]
plot(e)
acf(e)

plot(x)
lines(fitted(mod.setar), lty=2)
legend(x=1910, y=3.9,lty=c(1,2), legend=c("observed","fitted"))

plot(mod.setar)

[Package tsDyn version 0.6-1 Index]