Albert Lee <[email protected]> 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 <[email protected]> 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
[email protected]
*
* 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/