| |
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: Pweight in GLLAMM
Thanks,after I correct them, it runs for weight option. However, our data
is survey sample. I need probability weight in regression. However, it
fails for - pweight(wt)- option.
I guess that since the data is reshaped, new probability weight variables
need to be redefined. Is that right?
From: "Stas Kolenikov" <[email protected]>
Reply-To: [email protected]
To: [email protected]
Subject: Re: st: Pweight in GLLAMM
Date: Thu, 12 Apr 2007 23:11:22 -0500
AFAIK, -gllamm- expects two variables (or whatever your number of
levels is) to represent weights, and -weight- option gives the
stem/prefix of their names. So you should have had wt1=1 and wt2,
and
specify -weight(wt)-.
On 4/12/07, Jin king <[email protected]> wrote:
Dear All,
I am trying to use GLLAMM to run a bivariate ordered probit model
incorperating the sampling weight. But I failed. The STATA returns
"weight
variables wt2 not found".
Here is the code:
gen cons =1
collapse (sum) wt2=cons, by(yy1 yy2 gender education)
gen int pid = _n
gen byte y1=yy1
gen byte y2=yy2
reshape long y, i(pid) j(eqdm)
tab eqdm, gen(d)
gen float x1gd = gender * d1
gen float x1ed =education* d1
gen float x2gd = gender * d2
gen float x2ed = education* d2
eq xx : d2
eq x1 : d1 - d2
gllamm y x1gd x1ed x2gd x2ed , trace i(pid) weight(wt2) family(
binomial)
l(oprobit) adapt thresh(xx) eqs(x1)
--
Stas Kolenikov
http://stas.kolenikov.name
*
* 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/
_________________________________________________________________
������� MSN Explorer: http://explorer.msn.com/lccn/
*
* 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/