powered by
AR(m) model
linear(x, m, d=1, steps=d, series, include = c( "const", "trend","none", "both"), type=c("level", "diff", "ADF"))
time series
embedding dimension, time delay, forecasting steps
time series name (optional)
Type of deterministic regressors to include
Whether the variable is taken is level, difference or a mix (diff y= y-1, diff lags) as in the ADF test
A nlar object, linear subclass.
nlar
linear
AR(m) model: $$ x_{t+s} = \phi_0 + \phi_1 x_t + \phi_2 x_{t-d} + \dots + \phi_m x_{t - (m-1)d} + \epsilon_{t+s}$$
nlar for fitting this and other models to time series data
# NOT RUN { #fit an AR(2) model mod.linear <- linear(log(lynx), m=2) mod.linear summary(mod.linear) # }
Run the code above in your browser using DataLab