Dear viewers,
I want to estimate the random effects for each unit in a random-effect model
using xtprobit.Following Sophia Rabe-Hesketh(I attached her mail to other users
in this list at the end),I used -gllamm- to do it.The process is as follows,
. gllamm y x n sa x_91 n_91 sa_91 y95-y04,i(code) link(probit) fam(binom) adapt
(estimation succeeds!)
. predict res, u (exactly following Sophia's mail)
invalid syntax
r(198);
Then I tried
. predict res, residual
invalid syntax
r(198);
I don't know what is the problem here.Is it wrong syntax or just because I
cannot predict residual after gllamm in this model?Thank you very much for
reading.
================Sophia's reply to some other users===============
If your xtprobit command was
xtprobit y x1 x2, i(id) re,
you can estimate the model in gllamm using
gllamm y x1 x2, i(id) link(probit) fam(binom) adapt
Then use
predict res, u
to get empirical Bayes predictions of the random
effects. The posterior means will be stored in
resm1 and the posterior standard deviations in
ress1.
===end===
Greetings,
Xiaoheng Zhang(Kevin)
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/