Announcement

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

  • Out of sample prediction for a logit model with dummy for time effect

    I have a panel data which I would like to fit a logit/xtlogit for it. I added i.year as time dummiesin my model for capturing common year effects and I got estimated time coefficient for each in-sample years. However, an issue arises when I want to calculate out of sample probability because there are no estimated intercepts for out of sample years. Do you have any suggestion for handling this issue? I notice that if I use c.year instead of i.year I can calculate out of sample probability but my in sample predictions looks nicer using i.year.
    Thanks in advance for your suggestions
    Sepi

  • #2
    Welcome to Stata list. You will increase your chances of useful answer by following the FAQ on asking questions-provide Stata code in code delimiters, readable Stata output, and sample data using dataex.

    Often when Stata won't do something it means that that thing is problematic to do. Obviously, if your model includes dummy variables and parameters for each of the years in the estimation sample, it can't include parameters for the years outside the estimation sample. In other words, your original model says that the intercept will vary by year, and you have no information on what the intercept should be once you start predicting out of the years in the estimation sample.

    This is one of the standard problems with fixed effects estimates - intellectually, it's not clear what you should do when you want to predict where there is no fixed effects parameter estimated.

    Probably the best thing you can do is to do a prediction based on assuming the fixed effect is zero, but this is a little bit inconsistent with your formal modeling before. Treating year as a continuous variable is certainly an alternative, you could do a likelihood test to see if treating year as continuous is better or worse than as a dummy.

    Comment


    • #3
      Thank you very much for your respond.
      I tried to avoid treating year as a continuous variable as model with dummy year is significantly better model according to statistical tests.
      I will check the out of sample probability with assuming that the time effect coefficient for out of sample is equal to coefficient of last year of in-sample estimation.

      Comment

      Working...
      X