MACRO SHOW2(field);
CALL VNAME(&FIELD,NAME);
put @1 " *" @4 NAME @13 " = " &FIELD. +B1";"; *******; %mend show2;
%MACRO SHOW3(field);
CALL VNAME(&FIELD,NAME);
put @1 " " @4 NAME @13 " = . " +B1";"; *******; %mend show3;
/*..... End Macro Code ..............................................*/
%*PROC SORT DATA = LIBRARY.SAMPLES;
PROC SORT DATA = &InLibref..&InData.
OUT = SAMPLES;
BY DONOR;
PROC GLM DATA = SAMPLES NOPRINT;
*CLASS DONOR;
BY DONOR;
MODEL &MODVARS. = DONOR;
OUTPUT
OUT = UPP
RSTUDENT = &GLMVARS.;
PROC SORT DATA = UPP
OUT = RANGE;
BY MPEPNUM FORMNMBR DONOR;
DATA _NULL_;
retain B1 -1; /* Pointer Control */
retain total 0;
retain outl 0;
file &PRNTFILE;
set RANGE end = EndoFile;
LENGTH ID 3; ID = 0;
LENGTH NAME $8; /* Used in MACRO SHOW */
/* Array Processing for output variables */
array OUTLIER{*} 3 &GLMVARS.;
array SCORE{*} 3 &MODVARS.;
DO I = 1 TO DIM(SCORE);
IF SCORE{i} NE . THEN TOTAL+1;
end;
DO I = 1 TO DIM(OUTLIER);
IF ( ABS(OUTLIER{i}) GE 3 ) THEN DO;
%ID(REVIEW: OUTLIER)
%SHOW(OUTLIER{i})
%SHOW2(SCORE{i})
%SHOW3(SCORE{i})
end;**** ABS GE &STATVAL ***********;
end;*** Array Processing****;
IF ENDOFILE THEN DO;
PCTOUT = (OUTL/TOTAL);
FORMAT PCTOUT PERCENT8.2;
END;
/* End of Record -- NO EDITS BELOW THIS LINE *************************/
if ID then put "END; *MPEPNum PROCESSING;";
if EndoF |