dm 'log;clear;output;clear;'; options ps=50 ls=70 pageno=1; goptions reset=global border ftext=swiss gunit=cm htext=0.4 htitle=0.5; goptions display noprompt; *********************************************************************; ** **; ** AUTHOR: Chris Bilder **; ** COURSE: STAT 4043 **; ** DATE: 11-5-00 **; ** UPDATE: **; ** PURPOSE: PLot h_ii values **; ** NOTES: **; ** **; *********************************************************************; title1 'Chris Bilder, STAT 4043'; data set1; input ad_resp size circ; datalines; 100 1 20000 400 8 80000 100 3 10000 300 5 70000 200 6 40000 400 10 60000 ; run; title2 'Get h_ii values'; proc reg data=set1; model ad_resp = size circ / influence; output out=out_set1 h=h; run; *Round the h_ii values for the plot; data out_set2; set out_set1; h_round = round(h,0.0001); run; title2 'The mean of size and circulation'; proc means data=set1 mean; var size circ; output out=out_mean1; run; data out_mean2; set out_mean1; if _STAT_ ne "MEAN" then delete; size_mean = size; circ_mean = circ; label = "Mean"; keep size_mean circ_mean label; run; data out_set3; merge out_mean2 out_set2; run; proc gplot data=out_set3; plot size*circ size_mean*circ_mean / overlay vaxis=axis1 haxis=axis2 frame grid; title2 "Size vs. Circulation"; axis1 label = (a=90 'Size') length=12 ; axis2 label=('Circulation') length=12 ; symbol1 pointlabel=("#h_round" h=0.5) v=dot cv=blue h=0.30; symbol2 pointlabel=("#label" h=0.6) v=square cv=red h=0.50; run; quit;