Date: Sun, 1 Feb 2004 18:22:04 -0500
Reply-To: Howard Schreier <Howard_Schreier@ITA.DOC.GOV>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Howard Schreier <Howard_Schreier@ITA.DOC.GOV>
Subject: Re: A do-loop question
The consensus seems to call for a macro.
Another possibility is a DATA step followed by a PROC SORT to reshape the
data, followed by a single PROC LOGISTIC step *with a BY statement*.
On Sat, 31 Jan 2004 21:42:58 -0800, jn mao <jn_mao@YAHOO.COM> wrote:
>Hi, SAS-L users,
>
>I need use a do-loop statement for a logistic model.
>
>I have several dependent variables need a logistic analysis by the same
independent variables. I want to use a do-loop statement to do it for
saving my time , can SAS allow a do-loop inside of procedure? I tried
several times, but the log always shown the syntax error. Could anyone give
me some helps? Thanks a lot.
>
>Here is my code:
>
>array aa {6} x1 x2 x3 x4 x5 x6;
>
>array bb {5} y1 y2 y3 y4 y5;
>
>do i=1 to 5;
>
>do j=1 to 6;
>
>do k=j+1 to 6;
>
>proc logistic;
>
>model bb{i}=aa{j} aa{k} aa{j}*aa{k};
>
>output;
>
>end;
>
>end;
>
>end;
>
>
>run;
>
>
>
>---------------------------------
>Do you Yahoo!?
>Yahoo! SiteBuilder - Free web site building tool. Try it!
|