No announcement yet.
  • Filter
  • Time
  • Show
Clear All
new posts

  • CI of time series forecast in diagram


    I have made a forecast for a time series using the forecast command. I would like to produce a diagram that shows the time series with a CI (confidence interval) for the forecasted periods.
    I have consulted the manual on the forecast command however I have not been able to produce the CI around the forecasted periods. I have tried using the tsfcastgraph, however with no success so far. Can anyone give me a hint on which command and extension I should be using? Thank you for any comments or advice.

    These are the commands I use:

    tsset time
    reg x y z
    estimates store x1
    forecast create x_model, replace
    forecast estimates x1
    forecast exogenous y z
    forecast solve, prefix(f_) begin(11)
    twoway (tsline f_x)

    I have time series data for two variables (y and z) for periods 1-40, and for periods 1-10 for the variable x.
    I create a forecast for the periods 11-40 for x, based on the historical data of variables y and z.

    Best regards

  • #2
    You'll increase your chances of a useful answer by following the FAQ on asking questions - provide Stata code in code delimiters, readable Stata output, and sample data using dataex.
    I'm afraid I don't use forecast, but a restated question might attract attention from someone who does.


    • #3
      Ok, thank you for the advice Phil!