/* regdemo.sas simple regression problem */ options ls=80 ; data a ; input y @@ ; * read across ; x = _n_ ; * so x goes 1 to 6 ; xx = x * x ; * quadratic ; cards ; 4.5 5.5 6.5 8 10 12 ; run ; proc reg data=a ; one: model y = x ; * simple linear regression ; two: model y = x xx ; * quadratic regression ; output out=b p=yhat r=ehat ; run ; proc print data=b ; title 'regression results' ; run ;