Reputation: 99
I am working on building a time series model.
However, I am having trouble understanding what the difference is between the simulate
function and the forecast
function in the forecast
package.
Suppose I built an arima model and want to use it to simulate future values as long as 10 years. The data is hourly and we have a year worth of data.
When using forecast
to predict the next 1000-step-ahead estimation, I got the following plot.
Using forecast method
Then I used the simulate
function to simulate the next 1000 simulated values and got the following plot.
Using simulate method
Data points after the red line are simulated data points.
In the latter example, I used the following codes to simulate the future values.
simulate(arima1, nsim=1000, future=TRUE, bootstrap=TRUE))
where arima1
is my trained arima model, bootstrap residuals are used because the model residuals are not very normal.
Per definition in the forecast
package, future=TRUE
means that we are simulating future values based on the historical data.
Can anyone tell me what the difference is between these two method? Why does simulate()
give me a much more realistic results but forecasted values from forecast()
just converge to a constant after several iterations (no much fluctuation to the results from simulate()
)?
Upvotes: 4
Views: 4473
Reputation: 31820
A simulation is a possible future sample path of the series.
A point forecast is the mean of all possible future sample paths. So the point forecasts are usually much less variable than the data.
The forecast
function produces point forecasts (the mean) and interval forecasts containing the estimated variation in the future sample paths.
As a side point, an ARIMA model is not appropriate for this time series because of the skewness. You might need to use a transformation first.
Upvotes: 8