options linesize=70 nodate; data hamster; infile "c:/datasets/hamster.txt" firstobs=4; input hiber lifetime; proc print; * Define properties of points and lines; symbol1 v=dot c=blue h=0.5; * Points; symbol2 ci=red; * Regression line; symbol3 ci=blue; * Lower prediction limit; symbol4 ci=blue; * Upper prediction limit; symbol5 ci=green; * Lower confidence limit; symbol6 ci=green; * Upper confidence limit; * Obtain simple linear regression model; proc reg; * Obtain x transpose x and xtranspose x inverse matrices. Show comfidence limits for mean and confidence limits for new observations. Use 95% confidence intervals for both; model lifetime=hiber / xpx i clb alpha=0.05; * Plot regression line with confidence and prediction intervals; plot lifetime*hiber / conf pred; run; quit;