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

st: Create variables from the results of 'svymean'


From   "Ueda, Takeshi (FAORAP)" <[email protected]>
To   [email protected]
Subject   st: Create variables from the results of 'svymean'
Date   Wed, 24 Nov 2004 11:35:05 +0700

Title: Create variables from the results of 'svymean'

Please tell me how I can create variables from a result of 'svymean'.  What is done in the appended simple program is first running the program up to the line "svymean ss1 ss2 ss3" to get results, which can be seen in Stata Results Window, and subsequently punching the numbers into the program using 'gen' command.  Is there a way that I can directly use the results of 'svymean' without defining the results as new variables? Thank you for your advise in advance.

**************************
svyset [pweight=weind]

svymean ss1 ss2 ss3

drop ss1-ss3

gen sw1=.0043243
gen sw2=.0006317
gen sw3=.0006557

svyset, clear(iweight)

gen z = sw1*sw2*sw3

******************************************





© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index