|From||Nick Winter <firstname.lastname@example.org>|
|Subject||Re: st: re: Sample with weights|
|Date||Mon, 03 Oct 2005 09:53:43 -0400|
This is simple, produces a sample of exactly the desired size,________________________________________________________
and I believe fulfills the condition of the probability of selection
being proportional to size .
*Assume "Size" is the company size variable, and M is the desired sample size
gen ppsorder = uniform() * Size
keep if _n <= M
Yes, sorting the file is a bit clumsy, but this is presumably a one time thing,
not something appearing inside a loop.
Fort Collins CO USA
(970) 491-6721 office