Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: adjust with pweight


From   [email protected]
To   [email protected]
Subject   st: adjust with pweight
Date   Thu, 22 May 2003 16:18:46 +0200

I am using svylogit followed by adjust, using pweights. When I try to set
certain factors to the grand mean when using adjust, stata seems to be
forgetting about the pweights.

Here is a simple example to illustrate my problem (using logit rather than
svylogit for simplicity).

Using the following data:

y,factor1,factor2,w
1,0,0,10
0,0,0,12
1,1,0,100
0,1,0,130
1,0,1,5
0,0,1,20
1,1,1,50
0,1,1,250

I tried the following commands:

logit y factor1 factor2 [pweight=w]
adjust factor1, by(factor2)

The adjust results tell me that the average if factor 1 is 0.5, which it
clearly isn't if one uses pweights (I calculate that it is 0.92)

Am I missing something? Perhaps for my "real" data I need to go through by
hand to calculate the average value of each factor, and specify it myself.

Thanks in advance for any suggestions, and apologies if this is a stupid
question - I'm fairly new to Stata.

Catherine Watt
------------------------------------------
Dr Catherine Watt
Epidemiologist
Stop TB, Communicable Diseases
World Health Organization
CH-1211 Geneva 27
Switzerland
 
[email protected]
tel.	+41 22 791 2680
fax	+41 22 791 4268
------------------------------------------
*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index