aar: Additive nonlinear autoregressive model

Description Usage Arguments Details Value Author(s) References Examples

View source: R/aar.R

Description

Additive nonlinear autoregressive model.

Usage

1
aar(x, m, d=1, steps=d, series)

Arguments

x

time series

m, d, steps

embedding dimension, time delay, forecasting steps

series

time series name (optional)

Details

Nonparametric additive autoregressive model of the form:

x[t+steps] = mu + sum_j s_j(x[t-(j-1)d])

where s_j are nonparametric univariate functions of lagged time series values. They are represented by cubic regression splines. s_j are estimated together with their level of smoothing using routines in the mgcv package (see references).

Value

An object of class nlar, subclass aar, i.e. a list with mostly internal structures for the fitted gam object.

Author(s)

Antonio, Fabio Di Narzo

References

Wood, mgcv:GAMs and Generalized Ridge Regression for R. R News 1(2):20-25 (2001)

Wood and Augustin, GAMs with integrated model selection using penalized regression splines and applications to environmental modelling. Ecological Modelling 157:157-177 (2002)

Examples

1
2
3
4
5
6
#fit an AAR model:
mod <- aar(log(lynx), m=3)
#Summary informations:
summary(mod)
#Diagnostic plots:
plot(mod)

Example output

Non linear autoregressive model

AAR model

Family: gaussian 
Link function: identity 

Formula:
y ~ s(V1.0, bs = "cr") + s(V1..1, bs = "cr") + s(V1..2, bs = "cr")

Estimated degrees of freedom:
2.85 3.39 2.55  total = 9.79 

GCV score: 0.2408534     

Residuals:
       Min         1Q     Median         3Q        Max 
-1.2439386 -0.2666732  0.0047851  0.2853675  1.0369893 

Fit:
residuals variance = 0.195,  AIC = -130, MAPE = 5.666%

Family: gaussian 
Link function: identity 

Formula:
y ~ s(V1.0, bs = "cr") + s(V1..1, bs = "cr") + s(V1..2, bs = "cr")

Parametric coefficients:
            Estimate Std. Error t value  Pr(>|t|)    
(Intercept)  6.70683    0.04448  150.78 < 2.2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Approximate significance of smooth terms:
            edf Ref.df       F p-value    
s(V1.0)  2.8491 3.5678 54.3269 < 2e-16 ***
s(V1..1) 3.3873 4.2096  7.9558 7.5e-06 ***
s(V1..2) 2.5519 3.2274  1.7656  0.1489    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

R-sq.(adj) =  0.869   Deviance explained =   88%
GCV = 0.24085  Scale est. = 0.21961   n = 111

tsDyn documentation built on May 29, 2017, 10:48 a.m.