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

From |
"rafaelcla" <rafaelcla@uol.com.br> |

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

Subject |
Re:st: How to weight datasets? |

Date |
Sat, 30 Aug 2008 21:46:37 -0300 |

Hagen, In order to obtain weighted estimations – and consequently fit your data on a specific population – you’ll need to “place the weight” on estimation command NOT on the data. “To Weight” the data (like, by replicate a single case X times according to its weight) does not work in many, many situations…and will possibly drive you to wrong results…so, don’t do this unless you are totally sure about it. As I’m not exactly sure about the sample design (and the kind of weight) you have…I’ll give you an example as if you were using “probability weights”. After loading your dataset, to obtain a weighted mean of variable “X”, using the weight variable “Y” (that should indicate the probability weight or just PW), all you need to do is type: mean X [pw=Y] In fact, as you can note, the “weighting procedure” (described by the extension “[pw=Y]” on the command above) works as an extension of the command…not a command itself (if you type just "mean X"stata will give you the unweighted mean). Not all kinds of weight (PW, AW, IW…) work with all commands…but you can figure this out on the help file of the commands you want to proceed with. Best, Rafael Claro ---------- Início da mensagem original ----------- De: owner-statalist@hsphsun2.harvard.edu Para: statalist@hsphsun2.harvard.edu Cc: Data: Sat, 30 Aug 2008 15:24:35 +0200 Assunto: st: How to weight datasets? > I have four separate datasets that I would like to weight in order to fit them on a specific population. I know that Stata has commands like pweight or aweight, but how exactly do I use them to create a weighted dataset? > Maybe someone has a do-file to show me or simply write me the needed commands. The Stata- help is no good for me, since I`m not able to use it correctly. > > HELP > > Thanks a lot > > > -- > GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen! > Jetzt dabei sein: http://www.shortview.de/wasistshortview.php?mc=sv_ext_mf@gmx > > * > * For searches and help try: > * http://www.stata.com/help.cgi?search > * http://www.stata.com/support/statalist/faq > * http://www.ats.ucla.edu/stat/stata/ * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

- Prev by Date:
**Re: st: How to weight datasets?** - Next by Date:
**Re: st: How to weight datasets?** - Previous by thread:
**Re: st: How to weight datasets?** - Next by thread:
**st: Exporting summary tables** - Index(es):

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