options ps=54 ls=76; data one; infile 'C:\data\trouthead.dat'; input gender lake head body; run; data female; set one; if gender=2; lbody=log10(body); lhead=log10(head); run; proc means mean noprint; var lbody; output out=lbodymean mean=lbodymean; data lbodymean; set lbodymean; do i=1 to 60; output; end; drop i; run; data female2; merge female lbodymean; lbodydev=lbody-lbodymean; if lake=1 then kl=1; else kl=0; if lake=2 then wl=1; else wl=0; run; proc glm; model lhead = kl wl lbodydev / noint; run; quit;