Date: Tue, 3 Jul 2007 10:06:02 -0400
Reply-To: Gene Maguin <emaguin@buffalo.edu>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Gene Maguin <emaguin@buffalo.edu>
Subject: Re: How to generate 1000 samples?
In-Reply-To: <d54cebfa0707022223rc9f3951t8a892945ac046738@mail.gmail.com>
Content-Type: text/plain; charset="us-ascii"
Louis,
Ok, now I understand much better what you want to do. This should work.
There may be a much more elegant way to do it but I don't know what it is.
Let me pose this question: Why not just take the first m cases in the set of
1000 as your 'selected' cases. There is nothing special about them.
Gene Maguin
INPUT PROGRAM.
VECTOR FILTER(100).
+ LOOP SAMPLE=1 TO 100.
+ LOOP #Case = 1 to 1000.
+ COMPUTE X = RV.NORMAL(0,1).
* HERE IS THE KEY STATEMENT. 10 IS THE NUMBER OF CASES TO BE SELECTED.
+ IF (SAMPLE LE 10) FILTER(SAMPLE)=1.
+ END CASE.
+ END LOOP.
+ END LOOP.
+ END FILE.
END INPUT PROGRAM.
|