Announcement

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

  • Mixed/Hierarchical Model - xtmixed - stata 12

    Hi:
    I want to use stata's xtmixed command to estimate institution effects (on individual outcomes) as random effects (which will give the Empirical Bayes estimates). The structure of my data is as follows:
    Y,ijt is an outcome or dependent variable, which is the outcome for individual "j" in institution "i" in year "t" - for each individual I have outcome over several years, but it is not a balanced panel. I want to estimate the effect of institutions as random effects. The reduced form equation includes a few individual level regressors, and a random school intercept. I use the following code to get the random effect estimates of institution effects:
    xtmixed individualoutcome individualgender individualrace || institutionyear_id: || individual_id:, variance mle nocons residuals (ar 1, t (year))

    However, the above model doesn't seem to be converging - I have ran it for hours now - have "not concave" for a few iterations.

    If the above model worked, I would then use predict command to obtain the estimates of institution random effects, but it seems to be a big if.

    The above model should yield an EBLUP. It also accounts for autocorrelation due to repeat observation on individuals - individual level errors are correlated across time within individuals.
    The errors might also be heteroskedastic, so an even better model would be:
    xtmixed individualoutcome individualgender individualrace || institutionyear_id: || individual_id:, variance mle residuals (ar 1, t (year) by(year))
    I don't have the results for this model either, as the model hasn't converged yet.

    When I use the following model which assumes a simpler correlation structure than above models, again the model fails to converge - this time I get "backed up" after a few "not concave" iteration and all the log likelihood values are the same for all the iterations.
    xtmixed individualoutcome individualgender individualrace || institutionyear_id: || individual_id:, variance mle

    The failure to converge in the last model could be due to the variance component estimates (at the student level) being really close. As I only need to get the predicted institution effect I don't need to specify individual effects as random effects, however, my question is doing so will not account for autocorrelation and heteroskedasticity mentioned above right?

    In other words, can I just run, "xtmixed individualoutcome individualgender individualrace || institutionyear_id:, variance mle" and use predict to estimate institution effects and get away with it?

    Please help!

    Thanks.




  • #2
    Duplicate post. Please, see the thread at http://www.statalist.org/forums/foru...mixed-stata-12.
    Kind regards,
    Carlo
    (Stata 18.0 SE)

    Comment

    Working...
    X