Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: RE: Stata 12: does new xtmixed make -pwigls- obsolete?
From
Nick Cox <[email protected]>
To
"'[email protected]'" <[email protected]>
Subject
st: RE: Stata 12: does new xtmixed make -pwigls- obsolete?
Date
Thu, 11 Aug 2011 22:36:30 +0100
What's -pwigls-, please?
Nick
[email protected]
Carter Rees
Stata 12 now allows the use of both level 1 and level 2 weights in
multilevel models. I am wondering what this means for the -pwigls-
command.
A bit of preliminary analysis reveals the following.
************************.
use http://www.stata-press.com/data/r12/pisa2000, clear
xtmixed isei female high_school college one_for both_for test_lang
[pw=w_fstuwt] || id_school:, pweight(wnrschbw) pwscale(size)
*** Level 1 weights using scaling method 2 Pfeffermann et al (1998)
Journal of the Royal Statistical Society B 60, 23-56.
egen sumw = sum(w_fstuwt), by(id_school)
egen nj = count(female), by(id_school)
gen pwt1s2 = w_fstuwt *nj / sumw
xtmixed isei female high_school college one_for both_for test_lang
[pw=pwt1s2] || id_school:, pweight(wnrschbw)
*********************************************************************.
The output produced by the first -xtmixed- model comes from page 345 of
"STATA
LONGITUDINAL DATA/PANEL DATA REFERENCE MANUAL RELEASE 12" and is the same
as using -pwigls- level 1 weight adjustment method 2 as suggested by
Pfeffermann et al (1998).
I am wondering if the newest version of -xtmixed makes -pwigls obsolete.
Also, I am looking to trade emails with anyone who has experience using
-gllamm in conjunction with pwigls- when modeling the Add Health
data.
*
* 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/