|
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;
|