Ben M. Gramig <gramigbe@msu.edu> wants to fit a fractional logit model using
data from a complex survey design:
> Can anyone clarify for me the difference in the standard errors generated by
> (for instance) "svylogit" versus "glm [pweight], fam(bin) link(logit)
> robust"?
-svylogit- can handle clustering and stratification, but -glm- cannot. In the
absence of clustering and stratification, -svylogit- and -glm, robust- (with
-pweights- if there are any) will result in the same model fit and standard
errors.
> The survey suite of commands indicate that std errors are calculated by
> Taylor linearization (by default in Stata8, which I'm running), but it is
> also my understanding (perhaps mistakenly?) that for non-linear regression
> routines in Stata a Taylor series expansion is also used to calculate
> "sandwich" std errors.
Correct. Taylor linearization and the sandwich variance estimator are
synonymous.
> When I fit a model using both sets of commands for the same data I get very
> similar std errors with no disagreement in inference from the two models.
>
> An example...
>
> . svyset [pweight= bloodwt], strata( state)
> pweight is bloodwt
> strata is state
>
> . svylogit blv_pos west seast neast ttlcattle cleaninject_cow
> cleaninject_heifer
> > dehorn_safe dehorn_saw
>
> [COMBINED OUTPUT BELOW]
>
> . glm blv_pos west seast neast ttlcattle cleaninject_cow cleaninject_heifer
> dehorn_safe
> > dehorn_saw [pweight=bloodwt], fam(bin) link(logit) robust
>
>
>
> LOGIT(glm) SVYLOGIT
> Robust
> Std. Err. Std. Err.
>
> West 0.3531389 0.3501034
> seast 1.060446 1.090085
> neast 0.2899766 0.2899524
> ttlcattle 0.0007633 0.0007623
> cleaninjec~w0.6201178 0.6199391
> cleaninjec~r0.5917452 0.5901283
> dehorn_safe 0.2837614 0.2842202
> dehorn_saw 0.4650457 0.463464
> _cons 0.2478754 0.2477516
>
>
> Note: I have a complex survey design but want to use glm to implement the
> fractional logit model, which is not allowed in conjunction with svy.
The above -glm- does not use the -svyset- strata information in its variance
estimate. However, Ben can use -suest- after -glm- to compute the survey's
design based variance estimates. Using Ben's example above, the Stata 8
commands would be:
. svyset [pweight=bloodwt], strata(state)
. glm blv_pos west seast neast ttlcattle cleaninject_cow
> cleaninject_heifer dehorn_safe dehorn_saw [iweight=bloodwt],
> fam(bin) link(logit) score(myscore)
. suest ., svy
Stata 9's -suest- does not require the -score()- option on -glm-.
See '[R] suest' for more examples.
--Jeff
jpitblado@stata.com
*
* 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/