* Olympic Example Use a quadratic regression model to fit the olympic.txt dataset; options linesize=70 nodate; data olympic; infile "c:/datasets/olympic.txt" firstobs=2; input fat chlor; fatsq = fat * fat; label fat="Fat Intake" fatsq="Fat * Fat" chlor="Blood Chloresterol"; * Try a linear regression model first; proc reg; title "Olympic Example"; model chlor=fat; plot r.*p. r.*npp.; * Quadratic regression model; proc reg; model chlor=fat fatsq; plot r.*p. r.*npp.; * proc glm can also be used for quadratic model. Advantage: extra variable fatsq not needed, Disadvantage: no plot option available, residuals must be saved in separage dataset; proc glm; model chlor=fat fat*fat; output out=out r=resid p=predict; * Produce residual plot; proc gplot; plot resid * predict; run; quit;