|Date: ||Thu, 14 Jul 2005 16:14:30 +0000|
|Reply-To: ||toby dunn <tobydunn@HOTMAIL.COM>|
|Sender: ||"SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>|
|From: ||toby dunn <tobydunn@HOTMAIL.COM>|
|Subject: ||Re: SIMPLE MACRO QUESTION?|
|Content-Type: ||text/plain; format=flowed|
Don't know that I have reached the Macro Mavenship or Macro Master level
yet. But looking at your code and what you want I'd say looks like good to
me provided you have that %do loop inside of a %macro definition. I don't
think I would bother with renaming your vars for the sake of teh loop they
are already named well enough to allow the loop to do its job without any
extra effort due to the name.
The title would be easy put something like this inside of your %do loop.
title "Logistic regression for data AAA where predictor variable is CM&I. "
I am not a stats guy per se, and therefore don't know if there is an easier
way to get what you want from proc logistics. I am pretty darn sure given
your title statement request that there isn't but hey I could be wrong here.
From: "Kevin F. Spratt" <Kevin.F.Spratt@DARTMOUTH.EDU>
Reply-To: "Kevin F. Spratt" <Kevin.F.Spratt@DARTMOUTH.EDU>
Subject: SIMPLE MACRO QUESTION?
Date: Thu, 14 Jul 2005 12:00:21 -0400
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
My naive notion is something like this:
%DO &I = 1 TO
PROC LOGISTIC DATA=WORK.A SIMPLE ALPHA=.01 ;
GENDER AGE_C3 RACE_C5 PAY_C4 TIME_C /
GENDER AGE_C3 RACE_C5 PAY_C4 TIME_C ISS / SELECTION=NONE
CONTRAST 'CM: 1 > 0' CM&I -1 1 /
It would be nice to include a title that changes with the cm variable.
Macro mavens, some clarity please.
Kevin F. Spratt, Ph.D.
Department of Orthopaedic Surgery
One Medical Center Drive
Lebanon, NH 03756-0001
(603) 653-6012 (voice)
(603) 653-6013 (fax)