nlar-methods: NLAR methods

nlar-methodsR Documentation

NLAR methods

Description

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

Usage

## S3 method for class 'nlar'
coef(object, ...)

## S3 method for class 'nlar'
fitted(object, ...)

## S3 method for class 'nlar'
residuals(object, initVal = TRUE, timeAttr = TRUE, ...)

## S3 method for class 'nlar'
deviance(object, ...)

## S3 method for class 'nlar'
mse(object, ...)

## S3 method for class 'nlar'
AIC(object, k = 2, ...)

## S3 method for class 'nlar'
BIC(object, ...)

## S3 method for class 'nlar'
MAPE(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

...

further arguments to be passed to and from other methods

initVal

Whether to return NA for initial values in residuals/predicitons etc

timeAttr

Whether the time attributes should be returned in the output

k

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

x, object

fitted ‘nlar’ object

ask

graphical option. See par

digits

For print method, see printCoefmat.

label

LaTeX label passed to the equation

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 documentation built on Feb. 16, 2023, 6:57 p.m.