ivx_ar_fit {ivx} | R Documentation |
Fitter Functions for IVX-AR Models
Description
Basic function called by ivx_ar
to fit predictive models.
These should only be used directly by experienced users.
Usage
ivx_ar_fit(
y,
x,
horizon = 1,
offset = NULL,
ar = "auto",
ar_max = 5,
ar_ic = "bic",
ar_grid = function(x) seq(x - 0.3, x + 0.3, by = 0.02),
...
)
Arguments
y |
vector of observations of length |
x |
design matrix of dimension |
horizon |
is the horizon (default horizon = 1 corresponds to a short-horizon regression). |
offset |
(numeric of length |
ar |
Method to include the autoregressive terms. "auto" find the optimal
ar order by using the information criteria. |
ar_max |
Maximum ar order of model to fit. |
ar_ic |
Information criterion to be used in model selection. |
ar_grid |
The ar grid sequence of which to iterate. |
... |
Further arguments passed to the function which is fitting the best AR model.
If |
Examples
ivx_ar_fit(monthly$Ret, as.matrix(monthly$LTY))
ivx_ar_fit(monthly$Ret, as.matrix(monthly$LTY), ar = 1)