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 (March 2008, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 4 Mar 2008 20:44:15 -0500
Reply-To:   Sigurd Hermansen <HERMANS1@WESTAT.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Sigurd Hermansen <HERMANS1@WESTAT.COM>
Subject:   Re: Monte Carlo and Proc SurveySelect macro loop
Comments:   To: maryidahosas <maryidahosas@yahoo.com>
In-Reply-To:   <b6ef7d99-2b48-4919-80ef-54827426c93d@u10g2000prn.googlegroups.com>
Content-Type:   text/plain; charset="us-ascii"

This simple variant of your program shows that the SAS Macro loop works as expected ... %LET BEGIN = 1; %LET END = 118; %macro surv; %Do J = &begin %to &end; /* proc surveyselect data=mg1.resjul07bins out=mg1.sample1 method=pps sampsize=&j rep=3 seed=1; size binwidth; run; */ /* <insert MC process here> */ %put j=&j; %end ; %mend surv;

%surv

-----Original Message----- From: owner-sas-l@listserv.uga.edu [mailto:owner-sas-l@listserv.uga.edu] On Behalf Of maryidahosas Sent: Tuesday, March 04, 2008 3:31 PM To: sas-l@uga.edu Subject: Monte Carlo and Proc SurveySelect macro loop

I am trying to get a monte carlo process working to build some coincidence factors by number of customers. I have had success in getting Proc SurveySelect to process the replications, but I still need my surveyselect to process several times with different sampsize . My code is below. I tried the macro loop for the processing, but it resolves before the survey select even operates, so it only processes for the J=End valuse of 118. Is there an easy way to execute this looping.?? Thanks for your help. Mary

/*************************************************/ %LET BEGIN = 1; %LET END = 118; %macro surv; %Do J = &begin %to &end; proc surveyselect data=mg1.resjul07bins out=mg1.sample1 method=pps sampsize=&j rep=3 seed=1; size binwidth; run; %end ; %mend surv;

%surv run;


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