seed: either NULL or an integer that will be used in a call to set.seed before simulating the time series. The default, NULL will not change the random generator state.
future: logical, if TRUE forecasts are simulated, if FALSE in-sample simulation is performed.
newdata: a named list containing future values of mixed frequency regressors. The default is NULL, meaning that only in-sample data is used.
insample: a list containing the historic mixed frequency data
method: the simulation method, if "static" in-sample values for dependent variable are used in autoregressive MIDAS model, if "dynamic"
the dependent variable values are calculated step-by-step from the initial in-sample values.
innov: a matrix containing the simulated innovations. The default is NULL, meaning, that innovations are simulated from model residuals.
show_progress: logical, TRUE to show progress bar, FALSE for silent evaluation
...: not used currently
Returns
a matrix of simulated responses. Each row contains a simulated response.
Details
Only the regression innovations are simulated, it is assumed that the predictor variables and coefficients are fixed. The innovation distribution is simulated via bootstrap.
Examples
data("USrealgdp")data("USunempr")y <- diff(log(USrealgdp))x <- window(diff(USunempr), start =1949)trend <-1:length(y)##24 high frequency lags of x includedmr <- midas_r(y ~ trend + fmls(x,23,12, nealmon), start = list(x = rep(0,3)))simulate(mr, nsim=10, future=FALSE)##Forecast horizonh <-3##Declining unemploymentxn <- rep(-0.1,12*3)##New trend valuestrendn <- length(y)+1:h
simulate(mr, nsim =10, future =TRUE, newdata = list(trend = trendn, x = xn))