Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: Obtaining individual estimates after xtlogit


From   "Scott Merryman" <smerryman@kc.rr.com>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: Re: Obtaining individual estimates after xtlogit
Date   Tue, 22 Jul 2003 20:08:19 -0500

----- Original Message -----
From: "Lisa H. Green" <ligreen@jhsph.edu>
To: <statalist@hsphsun2.harvard.edu>
Sent: Tuesday, July 22, 2003 12:05 PM
Subject: st: Obtaining individual estimates after xtlogit


> I would appreciate some guidance on how to obtain predicted values for
> each individual in my sample for each year of data, after running
> xtlogit (random effects). Specifically, my dataset has a cohort of
> individuals followed over 20 years and I would like to obtain
> individual predicted values for each person for each of the 20 years.
>
> I am able to do this in STATA 7 for my continuous variables with the
> following:
> .xtreg Y X, re i(ID)
> .predict varname
> .predict varname2, u
>
> Is there an equivalent approach for binary outcomes, as the "u" option
> is not allowed under xtlogit? So far I am only able to obtain
> population averages by year, but not for individuals (random effect)
> within each year.
>
> Thank you in advance for your help.
>
> Lisa Green
>

A similar question, dealing with -xtprobit- and predicting individual random
effects, was asked in April.   Sophia Rabe-Hesketh <spaksrh@iop.kcl.ac.uk>
replied:

"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.

The latest version of gllamm is available from SSC,
see also

http://www.iop.kcl.ac.uk/IoP/Departments/BioComp/programs/gllamm.html "


Hope this helps,
Scott


*
*   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/



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