LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (July 2007, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 24 Jul 2007 11:05:44 -0400
Reply-To:     Xin Wei <xinwei@STAT.PSU.EDU>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Xin Wei <xinwei@STAT.PSU.EDU>
Subject:      Re: random sampling

On Mon, 23 Jul 2007 13:19:00 -0400, wcw2 <wcw2@CDC.GOV> wrote:

>I need to select a random 72 observations from a parent column of 620 >observations (coded as 1,0) and then * 1000 or so for a Monte Carlo >simulation. How can I do this?

I'll help you if you can explain to me what monte carlo simulation is. :) haha joking.

you can assign a random number to each obs and then sort it and only pick up the first 72 obs. something like this:

%do i=1 %to 1000; data one; set one; ran=rannor(&i); run; proc sort; by ran; run; data simu; set one; if _n_<=72; run; %end;

but please tell me what monte carlo simu is. seriously.


Back to: Top of message | Previous page | Main SAS-L page