/* x4_1.sas */ /* Purpose: */ title1 'Example 4.1.'; data a; input y temp p1 p2 p3 p4 p5; t=(temp-190)/10; cards; 0.75 200 -3 5 -1 3 -1 1.00 210 -2 0 1 -7 4 1.35 200 -1 -3 1 1 -5 1.80 230 0 -4 0 6 0 2.60 240 1 -3 -1 1 5 3.60 250 2 0 -1 -7 -4 5.45 260 3 5 1 3 1 ; proc print; title2 'List of data.'; proc reg data=a; model y=p1 p2 p3 p4 p5 /xpx i; title2 'Analysis of full model. (polynomium of order 5.)'; proc reg data=a; model y=p1 p2 p3 p4 /xpx i; title2 'Analysis of reduced model. (polynomium of order 4.)'; proc reg data=a; model y=p1 p2 p3 /xpx i; title2 'Analysis of reduced model. (polynomium of order 3.)'; proc reg data=a; model y=p1 p2 /xpx i; title2 'Analysis of reduced model. (polynomium of order 2.)'; proc reg data=a; model y=p1 /xpx i; title2 'Analysis of reduced model. (polynomium of order 1.)'; proc glm data=a; model y=p1 p2 p3 p4 p5 /xpx inverse solution; title2 'Alternative analysis of full model. (polynomium of order 5.)'; title3 '(NB: compare TYPE I sums of squares etc. with example!)'; proc glm data=a; model y=p1 p2 p3 /xpx inverse solution; title2 'Alternative analysis of reduced model. (polynomium of order 3.)'; run;