Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Difference between svy:logit and xtgee - cluster effects.


From   "Austin Nichols" <austinnichols@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Difference between svy:logit and xtgee - cluster effects.
Date   Tue, 28 Aug 2007 10:59:52 -0400

Jakob Byg <jb449755@socsci.aau.dk>:

You may be confusing cluster-robust SE calculations and fixed effects
for clusters (possibly with various corrections for correlated
errors).  If you don't want to include fixed effects for clusters
(i.e. allow the conditional mean to vary by cluster) but just want to
estimate standard errors that allow for errors correlated within
cluster, you can use -svy- commands or the -cluster- option to get the
same result, i.e. any of the following 3 approaches are nearly
equivalent:

sysuse auto, clear
egen manuf=ends(make)
svyset [pw=w], psu(manuf)
svy: logit for mpg disp
logit for mpg disp [pw=w], clust(manuf) nolog
glm for mpg disp [pw=w], clust(manuf) fam(bin) nolog

But do you want to use an -xt- command to estimate a fixed-effect or
random-effect model?  Or did you want to specify a correlation
structure?

On 8/28/07, jb449755@socsci.aau.dk <jb449755@socsci.aau.dk> wrote:
> Dear listers,
>
> I'm working with a dataset containing individuals and areas.
> Rather than using a multilevel approach to explore the clustereffects
> I'm trying just to take account of the correlation within these
> clusters (areas) in my estimation.
>
> Can anyone please help me to understand the difference between
> svy:logit and xtgee in terms of interpretation of the estimates
> obtained by the different models?
> As far as I understand it both models are supposed to 'average out'
> the cluster effect across individuals. But the two models yield
> different estimates...?
>
> My commands are as follows (I am working with a dichotomous response):
>
> svyset cluster
> svy:logit yesno var1 var2...
>
> xtgee yesno var1 var2, i(cluster) link (logit) fam (bin)
>
*
*   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