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 2005, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 14 Jul 2005 12:55:38 -0400
Reply-To:     Arthur Tabachneck <art297@NETSCAPE.NET>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Arthur Tabachneck <art297@NETSCAPE.NET>
Subject:      Re: SIMPLE MACRO QUESTION?
Comments: To: "Kevin F. Spratt" <Kevin.F.Spratt@DARTMOUTH.EDU>

Kevin,

You've already received good responses to your question, but I think you might also need to adjust the counter to pad for the leading zeros.

For example:

%macro doit; %DO I = 1 %TO 2; %let C=%sysfunc(putn(&I,z2.)); title "Logistic Regression using cm&C."; /* Your proc logistic here but using cm&C. rather than cm&I.*/ %END; %MEND; %doit

Art ----------- On Thu, 14 Jul 2005 12:00:21 -0400, Kevin F. Spratt <Kevin.F.Spratt@DARTMOUTH.EDU> wrote:

>Running SAS 9.1 under Windows. > >I want to run two sets of 46 separate logistic regressions identical except >of the predictor. > >for cm01 - cm46 ( I COULD RENAME THESE TO CM1-CM46 TO ALLOW EASIER &I LOOPING) > >My naive notion is something like this: > > > >%DO &I = 1 TO >46; > > > PROC LOGISTIC DATA=WORK.A SIMPLE ALPHA=.01 ; >; > > CLASS >CM&I > > > GENDER AGE_C3 RACE_C5 PAY_C4 TIME_C / >PARAM=GLM; > > > MODEL TNT >=CM&I > > > GENDER AGE_C3 RACE_C5 PAY_C4 TIME_C ISS / SELECTION=NONE >; > > CONTRAST 'CM: 1 > 0' CM&I -1 1 / >ESTIMATE=EXP; > >%END; > > It would be nice to include a title that changes with the cm variable.


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