/*Read in the SPSS portable file using Proc Convert*/ filename file1 "d:\510\2007\data\htwt.por"; proc convert spss=file1 out=htwt; run; options pageno=1; OPTIONS FORMCHAR="|----|+|---+=|-/\<>*"; title; proc contents data=htwt; run; proc means data=htwt; run; goptions reset=all; goptions device=win target=winprtm; symbol1 color=black value=dot height=.5 interpol=rq; title "Scatter Plot with Quadratic Regression Line"; proc gplot data=htwt; where age < 20; plot height * age ; run; /*Data Step to Create Age-Squared, Centered Age, and Centered Age-Squared*/ data htwt2; set htwt; agesq = age*age; centage = age - 16.3; centagesq = centage*centage; run; title "Regression Model with Original Age and Age-Squared Variables"; proc reg data=htwt2; where age < 20; model height = age agesq; plot rstudent.*predicted.; output out=regdata1 p=predict r=resid rstudent=rstudent; run; quit; proc univariate data=regdata1; var rstudent; histogram; qqplot / normal(mu=est sigma=est); run; title "Regression Model with Centered Age and Age-Squared Variables"; proc reg data=htwt2; where age < 20; model height = centage centagesq; run; quit;