* This is file COPZINC.SAS ; TITLE 'Metallothionein Regulation by Copper and Zinc'; DATA zinc; infile copzinc; input M Cu Zn; Zn2=Zn**2; INVZn=1/Zn; INVCu=1/Cu; INVM=1/M; logCu=log(Cu); logZn=log(Zn); logM=log(M); LABEL M='Methallothionein mRNA' Cu='Dietary Copper level' Zn='Dietary Zinc level' Zn2='Squared Zinc level' INVZn='Reciprocal of Zinc' INVCu='Reciprocal of Copper' INVM='Reciprocal of Metallothionein mRNA' logCu='natural log of Copper' logZn='natural log of Zinc' logM='natural log of Metallothionein mRNA'; proc REG data=zinc; model M=Cu Zn; output P=Mhat R=RawRes STUDENT=StudRes RSTUDENT=StDelRes H=leverage COOKD=Cook; proc PRINT; var StudRes StDelRes leverage Cook; proc PLOT; plot RawRes*Cu/ Vref=0 Vpos=18 Hpos=60; plot RawRes*Zn/ Vref=0 Vpos=18 Hpos=60; * To get a normal probability plot of residuals, we have ; * to use the RANK procedure with the NORMAL=BLOM option to ; * generate normal probability scores for the residuals. We then ; * plot the residuals against their normals scores. (Note: This ; * is identical to the procedure you would use in MINITAB using the ; * NSCORE command.) ; proc RANK NORMAL=BLOM OUT=NORMPLT; var RawRes; RANKS Nresid; proc PLOT; plot RawRes*Nresid/ Vref=0 Vpos=18 Hpos=60; proc REG data=zinc; model M=Cu Zn Zn2; output P=Mhat R=RawRes STUDENT=StudRes RSTUDENT=StDelRes H=leverage COOKD=Cook; proc PRINT; var StudRes StDelRes leverage Cook; proc PLOT; plot RawRes*Cu/ Vref=0 Vpos=18 Hpos=60; plot RawRes*Zn/ Vref=0 Vpos=18 Hpos=60; proc RANK NORMAL=BLOM OUT=NORMPLT; var RawRes; ranks Nresid; proc PLOT; plot RawRes*Nresid/ Vref=0 Vpos=18 Hpos=60; proc PLOT data=zinc; plot INVM*INVZn/ Vref=0 Vpos=18 Hpos=60; plot INVM*INVCu/ Vref=0 Vpos=18 Hpos=60; plot logM*logZn/ Vref=0 Vpos=18 Hpos=60; plot logM*logCu/ Vref=0 Vpos=18 Hpos=60; plot logM*INVZn/ Vref=0 Vpos=18 Hpos=60; plot logM*INVCu/ Vref=0 Vpos=18 Hpos=60; proc REG data=zinc; model logM=INVCu INVZn; output P=Mhat R=RawRes STUDENT=StudRes RSTUDENT=StDelRes H=leverage COOKD=Cook; proc PRINT; var StudRes StDelRes leverage Cook; proc PLOT; plot RawRes*Cu/ Vref=0 Vpos=18 Hpos=60; plot RawRes*Zn/ Vref=0 Vpos=18 Hpos=60; proc RANK NORMAL=BLOM OUT=NORMPLT; var RawRes; ranks Nresid; proc PLOT; plot RawRes*Nresid/ Vref=0 Vpos=18 Hpos=60;