Statalist


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

Re: st: xtmelogit with variable as fixed and random effect error r(3200)


From   Alex Eapen <A.Eapen@econ.usyd.edu.au>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   Re: st: xtmelogit with variable as fixed and random effect error r(3200)
Date   Wed, 28 Oct 2009 22:01:29 +1100

I think there might be a solution to Jennifer's problem. Please correct me if I am wrong.
I think Jennifer wants to control for endogeneity due to unobserved village characteristics possibly being correlated with her covariates (I presume she has more covariates than age and gender she mentions in her post). And thus wants estimates of the within-village effect of her variables. By default, – xtmelogit – implicitly assumes that between and within village effects are equal and does not separate them. 
One option is to estimate the model using only village fixed effects, i.e., with village dummies. However, adding village dummies in a logit model is not always the same as running xtlogit, fe . While xtlogit, fe is a conditional likelihood method, logit with dummies is an unconditional likelihood one. The latter could give you biased estimates if the number of dummy variables increases with sample size (Allison, 2009: p. 32).
If you want to use - xtmelogit – but still estimate both fixed and random effects, you should add to your equation the village-specific means for your covariates. Once you do this, the estimated coefficients of covariates will be the fixed, “within village” effects (i.e. fixed effects after accounting for all unobserved stable village characteristics). The coefficient of the village-specific means will be the difference between fixed and between village effects. This procedure is described well in Rabe-Hesketh & Skrondal (2008: p115), and does not explicitly estimate multiple intercepts as Maarten pointed out.
************************
Code:
egen mage = mean(age), by(villagecode)
xtmelogit depvar age gender mage || villagecode:
*******************
References:
Allison, P. 2009. Fixed effects regression models, Sage publications.
Rabe-Hesketh, S  & Skrondal, A . 2008 (2nd ed). Multilevel and longitudinal modelling using Stata, Stata Press.
Hope this helps,
Alex

Alex Eapen, PhD
Assistant professor
Faculty of Economics & Business
The University of Sydney
N307 Institute Bldg
NSW 2006, Australia
*
*   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/



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