Hello Stata community,
I have a question for a project for my studies about how to plot the confidence interval for a time series forecast.
What I have been able to do so far: I have formatted the data as a time series, I have determined that it follows an ARMA(2,1), and I have been able to make forecasts. That part is fine. I can graph my forecasts just fine.
What I'd like to add: I would like to graph my forecast with the upper and lower bounds of the confidence interval. Is there a command to add those? Either a command that graphs them directly, or a command that calculates them as a new variable, since I can then graph those myself. (I think I have been able to calculate them manually but I'm not sure I did it correctly. I'm assuming there is a pre-installed command, since this is pretty basic for cross-validation.) I have seen online that some people have been able to calculate the lower and upper bounds with the command "predict yhat, stdf" but the stdf option seems to be disabled for my version of Stata (18).
Would you know how to calculate and/or graph the confidence interval for a time series forecast?
Thanks in advance!
SB
I have a question for a project for my studies about how to plot the confidence interval for a time series forecast.
What I have been able to do so far: I have formatted the data as a time series, I have determined that it follows an ARMA(2,1), and I have been able to make forecasts. That part is fine. I can graph my forecasts just fine.
What I'd like to add: I would like to graph my forecast with the upper and lower bounds of the confidence interval. Is there a command to add those? Either a command that graphs them directly, or a command that calculates them as a new variable, since I can then graph those myself. (I think I have been able to calculate them manually but I'm not sure I did it correctly. I'm assuming there is a pre-installed command, since this is pretty basic for cross-validation.) I have seen online that some people have been able to calculate the lower and upper bounds with the command "predict yhat, stdf" but the stdf option seems to be disabled for my version of Stata (18).
Would you know how to calculate and/or graph the confidence interval for a time series forecast?
Thanks in advance!
SB
Comment