/* x5_2.sas */ /* Purpose: */ title1 'Example 5.2.'; data a; retain gent 0; input a b c d; gent=gent+1; x=a; prod='A'; output; x=b; prod='B'; output; x=c; prod='C'; output; x=d; prod='D'; output; keep x gent prod; cards; 3210 3225 3220 3545 3000 3320 3410 3600 3315 3165 3320 3580 . 3145 3370 3485 ; proc print data=a; title 'List of data.'; proc glm data=a; class prod; model x=prod; means prod; title2 'Analysis using GLM.'; data b; set a; x=(x-3000)/5; proc print data=b; title2 'List of data - coded.'; proc glm data=b; class prod; model x=prod; means prod; title2 'Analysis of coded data using GLM.'; run;