Fei Deng wrote:
> Is there a way to predict the fixed effects after xtlogit fe? For
> example, after xtlogit y x1 x2 x3, i(hid) fe, it seems to me the predict
> (xb) command doesn't include the household specific fixed effect. If I
> really want to know the household specifix fixed effect, is there a way
> to get it? Will the gllamm report the fixed effects?
Using a play dataset, with "sex" as the fixed effect, is this what you're
looking for?
. use http://www.stata-press.com/data/r9/choice.dta
. xtlogit choice car income size dealer, i(sex) fe
note: multiple positive outcomes within groups encountered.
Iteration 0: log likelihood = -456.52627
Iteration 1: log likelihood = -456.50694
Iteration 2: log likelihood = -456.50694
Conditional fixed-effects logistic regressionNumber of obs = 885
Group variable (i): sex Number of groups = 2
Obs per group: min = 237
avg = 442.5
max = 648
LR chi2(4) = 201.00
Log likelihood = -456.50694 Prob > chi2 = 0.0000
---------------------------------------------------------------------------
choice | Coef. Std. Err. z P>|z| [95% Conf. Interval]
----------+----------------------------------------------------------------
car | -.629198 .25357 -2.48 0.013 -1.126186 -.1322099
income | -.0058063 .0069054 -0.84 0.400 -.0193407 .0077281
size | .1585559 .0916049 1.73 0.083 -.0209865 .3380983
dealer | .0869242 .0282616 3.08 0.002 .0315326 .1423158
---------------------------------------------------------------------------
. predict effect, xb
. tab sex, sum(effect)
| Summary of Linear prediction
sex | Mean Std. Dev. Freq.
------------+------------------------------------
female | -.30800892 1.0851767 237
male | -.18530048 1.0952779 648
------------+------------------------------------
Total | -.21816138 1.0933217 885
If so - and perhaps there is a more elegant way of doing it than this -
you can also acheive the same result by:
. clogit choice car income size dealer, group(sex) [or]
If not, I'm stumped!
CLIVE NICHOLAS |t: 0(044)7903 397793
Politics |e: [email protected]
Newcastle University |http://www.ncl.ac.uk/geps
Whereever you go and whatever you do, just remember this. No matter how
many like you, admire you, love you or adore you, the number of people
turning up to your funeral will be largely determined by local weather
conditions.
*
* 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/