%newsas(fitinfl); %include goptions; *include data(fitnessd) ; goptions hsize=7in vsize=7in vorigin=1in; goptions htext=1.6 htitle=1.8; title "Fitness Data: Influence plot, bubble proportional to Cook's D"; proc reg data=psy303.fitness; model oxy=runtime age weight runpulse maxpulse rstpulse ; id name; output out=diagnose h=hatvalue rstudent=rstudent cookd=cookd; data labels; set diagnose nobs=n; length xsys $1 ysys $1 function $8 position $1 text $12 color $8; retain xsys '2' ysys '2' function 'LABEL' color 'BLACK'; x=hatvalue; y=rstudent; tcrit = tinv(.975, n-3); * if _n_=1 then put tcrit; if abs(rstudent) > tcrit or hatvalue > (2 * 7/n) then do; text=name; size=1.8; * text=put(_n_,2.0); end; proc gplot data=diagnose &GOUT ; bubble rstudent * hatvalue = cookd / annotate=labels frame haxis=axis1 vaxis=axis2 vref=-2.04 0 2.04 lvref=33 href=.451 lhref=33 bsize=10 name='GB0520' ; axis1 label=('Hat Value') minor=none offset=(2,2) order=0 to .50 by .10; axis2 label=(a=90 r=0 'Studentized Residual') minor=none offset=(0,0) order=-4 to 4 by 2; format hatvalue 3.2; run; %gfinish;