Date: Tue, 11 Apr 2000 19:40:37 -0400
Reply-To: Raynald Levesque <rlevesque@VIDEOTRON.CA>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Raynald Levesque <rlevesque@VIDEOTRON.CA>
Subject: Re: sampling proportionate to size
Content-type: text/plain; charset=iso-8859-1
Here is the solution I posted last month. It is applicable to your problem.
This solution is fine when the number of cases (the number of persons in
your problem) is not too large. Say less than 500,000. More sofisticated
solution would have to be derived for larger populations.
DATA LIST FREE / id numb .
1 5 2 15 3 30
LOOP cnt=1 TO numb.
XSAVE OUTFILE='temp.sav' /KEEP id numb.
VARIABLES=draw (A) /RANK /PRINT=NO
* In next line, replace 30 by the desired sample size.
SELECT IF (rdraw<=30).
Raynald Levesque firstname.lastname@example.org
----- Original Message -----
From: Gonzalo Kmaid <gkmaid@INTERNET.COM.UY>
Sent: Tuesday, April 11, 2000 4:52 PM
Subject: sampling proportionate to size
> Hi All,
> Here´s another sampling question. I have a data set of n blocks that
> like this:
> blockid persons cumpop
> 1 110 110
> 2 120 230
> 3 320 550
> 4 89 639
> 5 65 704
> The number of persons living in each block varies a lot, so I want to get
> sample of blocks taking into account the size of the block (prob of block
> to be selected proportional to its weight in the cumulative pop figure).
> I think Raynald posted some time ago a piece of syntax to do something
> similar. TIA!!!!
> Gonzalo Kmaid