ivx {ivx} | R Documentation |
Fitting IVX Models
Description
ivx fits predictive regression models. The method allows standard chi-square testing for regressors with different degrees of persistence, from stationary to mildly explosive, and can be used for both short- and long-horizon predictive regressions.
Usage
ivx(
formula,
data,
horizon,
na.action,
weights,
contrasts = NULL,
offset,
model = TRUE,
x = FALSE,
y = FALSE,
...
)
## S3 method for class 'ivx'
print(x, digits = max(3L, getOption("digits") - 3L), ...)
Arguments
formula |
an object of class "formula" (or one that can be coerced to that class): a symbolic description of the model to be fitted. |
data |
n optional data frame, list or environment (or object coercible by
|
horizon |
is the horizon (default horizon = 1 corresponds to a short-horizon regression). |
na.action |
a function which indicates what should happen when the data
contain NAs. The default is set by the na.action setting of |
weights |
an optional vector of weights to be used in the fitting process.
Should be |
contrasts |
an optional list. See the |
offset |
this can be used to specify an a priori known component to be included in the linear predictor during fitting. This should be NULL or a numeric vector or matrix of extents matching those of the response. One or more offset terms can be included in the formula instead or as well, and if more than one are specified their sum is used. See model.offset |
model |
logical. If |
x |
an object of class "ivx", usually, a result of a call to ivx. |
y |
logical. If |
... |
additional arguments to be passed to the low level regression fitting functions (see lm). |
digits |
the number of significant digits to use when printing. |
Value
an object of class "ivx".
References
Magdalinos, T., & Phillips, P. (2009). Limit Theory for Cointegrated Systems with Moderately Integrated and Moderately Explosive Regressors. Econometric Theory, 25(2), 482-526.
Kostakis, A., Magdalinos, T., & Stamatogiannis, M. P. (2014). Robust econometric inference for stock return predictability. The Review of Financial Studies, 28(5), 1506-1553.
Examples
# Univariate
ivx(Ret ~ LTY, data = kms)
# Multivariate
ivx(Ret ~ LTY + TBL, data = kms)
# Longer horizon
ivx(Ret ~ LTY + TBL, data = kms, horizon = 4)
wt <- runif(nrow(kms))
ivx(Ret ~ LTY, data = kms, weights = wt)