[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
rgutierrez@stata.com (Roberto G. Gutierrez, StataCorp) |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Predicting Random Effects from a Crossed-Level Model using xtmelogit |

Date |
Tue, 29 Dec 2009 09:09:40 -0600 |

Albert Lee <Albert.Lee@hud.gov> asks: > I'm estimating a logistic model with crossed-level random effects. The > outcome binary variable is fail with one fixed-effect independent binary > variable refinance. The three crossed-level random effects are VAR1, VAR2 > and VAR3. The STATA command I u sed is as below: > xtmelogit fail refinance || _all:R.VAR1 || _all:R.VAR2 || _all:R.VAR3 > After estimating this model, I tried to recover the random effects of VAR3 > using: > predict u, reffects level(VAR3) > However, u only contains missing values. > I would very much appreciate if someone can help me recovering these > predicted random effects. As pointed out by Joseph Coveney <jcoveney@bigplanet.com> on another post in this thread, Albert's syntax above is incorrect because there is no "VAR3" level in the model, but instead only one overall "_all:" level. As such, to recover the random effects for the levels of -VAR3-, type . predict u1 u2 u3, reffects Given the order of the terms in the model, variable -u3- will contain the random effects for -VAR3-. That said, it is curious that what you typed produced missing values for -u- instead of a syntax error, as my attempts at reproducing this produce gave the expected syntax error. If Albert can send me his data and a do file that reproduces the missing values for -u-, I'll be glad to take a closer look. --Bobby rgutierrez@stata.com * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

- Prev by Date:
**RE: st: exiting Stata from within Stata** - Next by Date:
**st: RE: Re: increasing time burden during resampling** - Previous by thread:
**st: RE: RE: Re: Predicting Random Effects from a Crossed-Level Model using xtmelogit** - Next by thread:
**st: -spmap- filling map polygons with patterns instead of color** - Index(es):

© Copyright 1996–2016 StataCorp LP | Terms of use | Privacy | Contact us | What's new | Site index |