Announcement

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

  • Prediction out of sample

    Hello, i am using the command meglm and the part of postestimation says " These statistics are available both in and out of sample", i want estimate out of sample but i dont know how. I hope you can help me!
    Thanks !!

  • #2
    your question is very unclear - exactly what are you trying to do?

    however, in general, when a Stata help file says something like your quote, it means that, unless you explicitly try to limit what you are doing (e.g., predict), then you will get that action for everyone, regardless of whether they are in the sample; if you only want the action for out-of-sample observations, tack on "if !e(sample)" (i.e., if not in the sample); for example if you want predictions for just those not in the sample:
    Code:
    predict junk if !e(sample)
    if you want predictions for everyone regardless of whether in the sample, leave off the "if !e(sample)" part

    Comment


    • #3
      You have to use predict. Out-of-sample predictions are explained in [U] 20 Estimation and postestimation commands, with examples.

      Comment

      Working...
      X