/* x5_5.sas */ /* Purpose: */ title1 'Example 5.5.'; data a; input time replicat weight1 weight2 weight3 weight4; cards; 1 1 7.50 7.81 7.50 8.05 1 2 7.70 7.94 7.77 7.53 1 3 7.93 7.23 7.96 8.16 1 4 7.52 7.94 7.83 7.76 2 1 8.17 8.29 8.46 8.38 2 2 8.09 8.54 8.33 8.47 2 3 8.11 8.45 8.27 8.38 2 4 7.96 8.43 8.24 8.60 3 1 8.01 8.01 8.37 8.16 3 2 8.17 7.92 8.27 7.96 3 3 8.05 8.27 8.07 8.08 3 4 7.91 7.92 8.28 8.52 ; proc print; title2 'List of data.'; data b; set a; machine=1; weight=weight1; output; machine=2; weight=weight2; output; machine=3; weight=weight3; output; machine=4; weight=weight4; output; keep time machine replicat weight; proc print; title2 'List of reorganised data.'; proc anova; class machine time replicat; model weight=time|machine; means time machine machine*time; title2 'Analysis of systematic model using proc anova.'; proc glm; class machine time replicat; model weight=time|machine /solution; random time machine*time /test; means time machine machine*time; title2 'Analysis of random model using proc glm.'; run;