Announcement

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

  • Out-of-sample forecasts after qreg (quantile regression)

    Hi Statalisters,

    I am trying to do out-of-sample forecasts after conducting a quantile regression. I am able to do in-sample forecasting, however, when I try doing it out-of-sample, I get missing values. My sample ends at 2017q4 but I add 12 more quarters to do the forecasting and get missing values for all observations for "p" (see below).

    Below is my code:

    qreg y a b
    predict yp if time <=tq(2017q4)
    tsappend, add(12)
    predict p if time>tq(2017q4)

    Thanks very much.

    Sam.


  • #2
    You need values for a and b when time > tq(2017q4)

    Comment


    • #3
      Thanks, Scott.

      I do not have values for a and b when time > tq(2017q4). In this case, how can I forecast one-quarter ahead of two-quarters ahead (after running a quantile regression)?

      Many thanks.

      Sam.

      Comment

      Working...
      X