LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (September 1997, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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


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