predict.sparseDFM {sparseDFM} | R Documentation |
Forecasting factor estimates and data series.
Description
Predict the next h steps ahead for the factor estimates and the data series. Given information up to time , a h-step ahead forecast is
, where
for the IID idiosyncratic error case.
Usage
## S3 method for class 'sparseDFM'
predict(object, h = 1, standardize = FALSE, alpha_index = "best", ...)
## S3 method for class 'sparseDFM_forecast'
print(x, ...)
Arguments
object |
an object of class 'sparseDFM'. |
h |
integer. The number of steps ahead to compute the forecast for. Default is |
standardize |
logical. Returns data series forecasts in the original data scale if set to |
alpha_index |
Choose which L1 penalty parameter to display the results for. Default is 'best'. Otherwise, input a number between 1:length(alpha_grid) that indicates the required alpha parameter. |
... |
Further |
x |
an object of class 'sparseDFM_forecast' from |
Value
X_hat numeric matrix of data series forecasts.
F_hat numeric matrix of factor forecasts.
e_hat numeric matrix of AR(1) idiosyncratic error forecasts if
err
=AR1
in sparseDFM
.
h forecasts produced for h steps ahead.
err the type of idiosyncratic errors used in sparseDFM
.
Prints out the h-step ahead forecast from predict.sparseDFM
.