Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

nlar-methods

nlar methods


Description

Generic ‘nlar’ methods. Method ‘nlar’ is described in a separate page: predict.nlar

Usage

## S3 method for class 'nlar'
AIC(object, k=2,...)
## 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'
toLatex(object, digits, label, ...)

Arguments

x, object

fitted ‘nlar’ object

ask

graphical option. See par

digits

For print method, see printCoefmat.

k

numeric, the penalty per parameter to be used; the default k = 2 is the classical AIC

label

LaTeX label passed to the equation

...

further arguments to be passed to and from other methods

Details

MAPE

Mean Absolute Percent Error

mse

Mean Square Error

plot

Diagnostic plots

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)

tsDyn

Nonlinear Time Series Models with Regime Switching

v10-1.2
GPL (>= 2)
Authors
Antonio Fabio Di Narzo [aut], Jose Luis Aznarte [ctb], Matthieu Stigler [aut], Ho Tsung-wu [cre]
Initial release
2020-02-04

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.