[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

From |
"Shehzad Ali" <sia500@york.ac.uk> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
st: RE: RE: calculating means by group, with weights |

Date |
Wed, 25 Jun 2008 17:55:35 +0100 |

On the point raised by Nick: I have often seen people using aweights for survey data. Is that wrong? Shehzad -----Original Message----- From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Nick Cox Sent: 25 June 2008 17:36 To: statalist@hsphsun2.harvard.edu Subject: st: RE: calculating means by group, with weights A different issue: shouldn't survey weights be pweights? -----Original Message----- From: Nick Cox Sent: 25 June 2008 17:23 To: 'statalist@hsphsun2.harvard.edu' Subject: RE: calculating means by group, with weights This is an FAQ. FAQ . . Calculating variables containing weighted group summary statistics . . . . . . . . . . . . . . . . . . . . . N. J. Cox and S. P. Jenkins 1/03 I want to calculate a variable containing weighted group summary statistics, but I do not want to collapse the data and egen does not support weights. How can I do this? http://www.stata.com/support/faqs/data/weighted.html Gisella Young I am trying to calculate the mean of a variable ("income") across groups ("bracket"), but using the relevant survey weights (variable "weight"). I tried saying: bys bracket: egen float meanincome = mean(income) [fweight=weight] but this is not possible since the egen command does not allow for weighting. This is a problem for me as if I do not use the weights the means will be wrong. * * 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/ No virus found in this incoming message. Checked by AVG. Version: 8.0.101 / Virus Database: 270.4.1/1518 - Release Date: 25/06/2008 09:46 * * 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/

**Follow-Ups**:**Re: st: RE: RE: calculating means by group, with weights***From:*Maarten buis <maartenbuis@yahoo.co.uk>

**References**:**RE: st: St: variable editing***From:*"Howrey, Bret T." <bthowrey@UTMB.EDU>

**st: calculating means by group, with weights***From:*Gisella Young <gisellayoung@yahoo.com>

**st: RE: calculating means by group, with weights***From:*"Nick Cox" <n.j.cox@durham.ac.uk>

- Prev by Date:
**Re: st: calculating means by group, with weights** - Next by Date:
**st: RE: RE: probit questions** - Previous by thread:
**st: RE: calculating means by group, with weights** - Next by thread:
**Re: st: RE: RE: calculating means by group, with weights** - Index(es):

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