Hi, I have data on baseball games from 1915 - 2016 and am trying to predict the probability of a home win in 2009 based on estimated results from 1915 - 2008.
I run:
meqrlogit hwin pfby rec rboby gos hstrk vstrk || team: if year < 2009
predict ymu, mu
but the predictions stop after 2008. Same is true if I try predict re*, reffects. On the other hand, predict yxb, xb and predict yfo, fixedonly fill in for the rest of the years. I also tried using estimates save and got the same result.
From the memeqrlogitpostestimation manual (p.9):
What am I missing? I am making no changes to the estimation data...
I run:
meqrlogit hwin pfby rec rboby gos hstrk vstrk || team: if year < 2009
predict ymu, mu
but the predictions stop after 2008. Same is true if I try predict re*, reffects. On the other hand, predict yxb, xb and predict yfo, fixedonly fill in for the rest of the years. I also tried using estimates save and got the same result.
From the memeqrlogitpostestimation manual (p.9):
Technical note
Out-of-sample predictions are permitted after meqrlogit, but if these predictions involve estimated random effects, the integrity of the estimation data must be preserved. If the estimation data have changed since the model was fit, predict will be unable to obtain predicted random effects that are appropriate for the fitted model and will give an error. Thus to obtain out-of-sample predictions that contain random-effects terms, be sure that the data for these predictions are in observations that augment the estimation data.
Out-of-sample predictions are permitted after meqrlogit, but if these predictions involve estimated random effects, the integrity of the estimation data must be preserved. If the estimation data have changed since the model was fit, predict will be unable to obtain predicted random effects that are appropriate for the fitted model and will give an error. Thus to obtain out-of-sample predictions that contain random-effects terms, be sure that the data for these predictions are in observations that augment the estimation data.
Comment