check_xreg | R Documentation |
Used internally by other packages, these functions provides some commonly used validation checks on regressor matrices in both in and out of sample.
check_xreg(xreg, valid_index)
check_newxreg(newdata, xreg_names = NULL, h = 1, forc_dates = NULL)
xreg |
an xts matrix of named regressors. |
valid_index |
a vector of dates against which the xreg matrix index is compared for validity. |
newdata |
an xts matrix of out of named sample regressors. |
xreg_names |
names of regressors used in sample. |
h |
the forecast horizon |
forc_dates |
an optional vector of forecast dates. This is used if newdata is not an xts matrix in which case it formats the data into such using the forc_dates vector. |
Returns the xts input matrix if checks are passed else raises an error.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.