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 (March 1998, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Sun, 8 Mar 1998 15:38:37 +0100
Reply-To:     martin.gregory@bigfoot.com
Sender:       "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:         Martin Gregory <martin@DJOUCE.MANNHEIM-NETZ.DE>
Subject:      Re: Need help with SAS Macro
Comments: To: janey@UTSTAT.TORONTO.EDU
In-Reply-To:  message from Janey Shin on Sat, 7 Mar 1998 02:05:45 GMT
Content-Type: text/plain; charset=US-ASCII

Hi Janey,

my guess is that there is a global macro variable called i set either in /bio/janey/Thesis/glmm611.sas or in the macro %glimmix (are these the same?) and that it is being set to a value >100 which would mean that after the %inc or the macro call, the loop variable also is >100 which means the loop will not execute again.

Btw, if /bio/janey/Thesis/glmm611.sas contains only the definition of the glimmix macro I would move the %inc statement out of the loop and save loading the file 100 times!

cheers, Martin

Janey> Hi, I was wondering if someone with SAS macro expertise can Janey> help me with my problem. I am trying to create a macro Janey> that will read X number of simulated data stored as an Janey> external file which is stored as "sim25rX" where the suffix Janey> "X" designates my replicate number. Within my do loop I Janey> want to use the GLIMMIX macro on each replicate. My Janey> problem is that my macro is only reading one replicate! Janey> Can someone help me debug this? This is my program:

%macro loop; %do i=1 %to 100; filename sim&i "sim25r&i"; data sim&i; infile sim&i; input famid id clust sex g1_1 g1_2 g2_1 g2_2 ef efmean g1c g2c gresid presid resid gx px aff rep; run;

%inc '/bio/janey/Thesis/glmm611.sas'/nosource; %glimmix(data=sim&i, stmts=%str( class famid; model aff=g1c g2c ef/solution; random famid/solution; ), error=binomial,link=logit,options=noprint);

proc append base=out data=_soln; run; proc print data=out; run;

%end; %mend loop; %loop;

Thanks,

Janey -- Janey Shin Preventive Medicine and Biostatistics McMurrich Building University of Toronto

-- Martin Gregory Steubenstr. 52-54 martin@djouce.mannheim-netz.de D-69121 Heidelberg


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