Announcement

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

  • Out of sample prediction after -mixed-. Which commands to use (also to assess forecasting fit)?

    Hi everybody,

    I have panel data with a dependent variable for each city and repeated measures over time for cities (monthly measures, five years).
    I've been using -mixed- like in the following example (Stata 13):

    Code:
    mixed DEPENDENT PREDICTOR1 PREDICTOR2 || CITY:, var ml
    I'm only interested in fixed effects.
    Now the issue is I have to assess the forecasting ability of my model and compare it to the empty model.
    I would like to use 80% of my dataset to train the model and 20% to make out of sample forecasting. Can you suggest me how to do it in Stata?
    And which measures should I consider to assess the goodness of fit of the forecasting? (AIC, BIC, Out of Sample MSE, or others?) Can you tell me how to compute these measures for the out of sample?

    Thanks a lot!




  • #2
    You will have a better chance of a helpful answer if you follow the FAQ on asking questions - provide Stata code in code delimiters, readable Stata output, and sample data using dataex. You should also ask one question. You've got a bunch of questions listed. It doesn't look like you've made much effort to solve your problems yourself (providing your code would help here).

    There was a question just recently on prediction from mixed. But there are problems with the fixed effects when you predict something not in the original panels.

    Comment


    • #3
      The idea would be to train the model on 80% of my data and then use the other 20% for out of sample predictions. The cities are the same, they don't change, so there should be no problems with fixed effects I guess.

      Can you give me an example of the code I should use?

      Comment

      Working...
      X