options ls=75; data both; infile "rftc-2008.dat" firstobs=5; input sex $ age rtime; label rtime="race time"; run; proc glm; class sex; model rtime=age sex age*sex /solution; run; symbol value=dot i=rl; proc gplot; *by sex; title "linear fit"; plot rtime*age=sex; run; symbol value=dot i=rq; proc gplot; *by sex; title "quadratic fit"; plot rtime*age=sex; run; proc glm; title "full (overfit) model"; class sex; model rtime=age age*age sex age*sex age*age*sex; run; proc glm; title "final model"; class sex; model rtime=age age*age sex/solution; output out=residz r=r p=p; estimate "40 yr old man " intercept 1 age 40 sex 1 0; estimate "40 yr old woman" intercept 1 age 40 sex 0 1 ; run; proc gchart; vbar r; run; proc univariate normal plot; var r; run; /* proc reg; title "CP"; model rtime=age age2 male ageXmale age2Xmale/selection=cp; run; */