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

Re: st: pweights and -table-

From   "Emma Slaymaker" <>
To   <>
Subject   Re: st: pweights and -table-
Date   Fri, 14 Oct 2005 16:51:24 +0100

You can do this if you use the svy commands.  First you need to -svyset-
the data.  Assuming your weight variable is called weightvar:
svyset [pw=weightvar]
then you can use -svy:tab- which gives you the weighted count in

>>> 14/10/05 16:34:15 >>>
I'm applying pweights to a dataset and wish to work with the weighted
sum resulting from a -table- statement using r(). The problem arises
when the only r() output from -table- is r(N), when what I want is the
weighted value (as output in the results window). I can get access to
the weighted data using -summarize- just fine ("sum_w") but then I can't
use pweights. Is there a workaround, or am I just missing something




This email message is for the sole use of the intended recipient(s)
may contain privileged information. Any unauthorized review, use,
disclosure or distribution is prohibited. If you are not the intended
recipient, please contact the sender by reply email and destroy all
of the original message.

*   For searches and help try:
*   For searches and help try:

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