'Does there exist some alternative to simulate() function in R?
I am trying to model time series data with a modified version of nnetar model in R. For generating the prediction interval using simulation techniques, I am using the simulate function of R as follows:
simulate(fit, nsim = h)
where, fit is my fitted model. If, I am running this code say for 10 times, I am getting the correct output for approximately 7 or 8 times otherwise the following error message is popping up:
Error in simulate.nnetar(fit, nsim = h) : I can't simulate when there are missing values near the end of the series.
The frequency of this error is increasing as I am increasing the number of simulations.
Can anyone suggest to me how to overcome this issue?
Thanks in advance.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
