Date: Thu, 4 Sep 1997 10:08:13 -0400
Reply-To: rcoleman@worldnet.att.net
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: Ron Coleman <rcoleman@WORLDNET.ATT.NET>
Organization: Links Analytical, Inc.
Subject: Re: Macro to run PROC REG several times
Content-Type: text/plain; charset=us-ascii
Diego Valderrama wrote:
>
> Hello:
>
> I am interested in running a loop (similar to a do loop) to run a PROC REG
> statement with a set of 47 variables. I have 47 pairs of time series data
> (one is an explanatory variable and the other the dependent variable)
> named s1-s47 and a1-a47 and would like to know if it is possible to run a
> program, possibly using a macro variable, that allows me to just run one
> model statement in the PROC REG procedure.
>
> Thanks for the help.
>
> Diego
>
> ***********************************************************************
> Diego Valderrama Economics Dept.
> 301 Swift Ave. #1 Box 90097
> Durham, NC 27705 Duke University
> (919) 613 3701 Durham, NC 27708
Try:
%macro runreg;
%do i = 1 %to 47;
proc reg data=whatever;
model a&i = s&i;
run;
%end;
%mend runreg;
%runreg;
--
Ron Coleman A SAS Quality Partner.
Links Analytical, Inc. Linking your data to your business!
3545-1 St. Johns Bluff Rd. Suite 300
Jacksonville FL 32224 mailto:rcoleman@worldnet.att.net
(904) 641-4766
|