linear: Linear AutoRegressive models

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/linear.R

Description

AR(m) model

Usage

1
2
	linear(x, m, d=1, steps=d, series, include = c( "const", "trend","none", "both"), 
        type=c("level", "diff", "ADF"))

Arguments

x

time series

m, d, steps

embedding dimension, time delay, forecasting steps

series

time series name (optional)

include

Type of deterministic regressors to include

type

Whether the variable is taken is level, difference or a mix (diff y= y-1, diff lags) as in the ADF test

Details

AR(m) model:

x[t+steps] = phi[0] + phi[1] x[t] + phi[2] x[t-d] + … + phi[m] x[t - (m-1)d] + eps[t+steps]

Value

A nlar object, linear subclass.

Author(s)

Antonio, Fabio Di Narzo

See Also

nlar for fitting this and other models to time series data

Examples

1
2
3
4
#fit an AR(2) model
mod.linear <- linear(log(lynx), m=2)
mod.linear
summary(mod.linear)

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

Search within the tsDyn package
Search all R packages, documentation and source code