/* x5_6.sas */ /* Purpose: */ title1 'Example 5.6. Artificial data.'; data a; do diet=1,2,3,4,5; do age=20,30,40,50; do replicat=1,2,3,4,5; wgh= 70 + 2*diet + age/10; err= rannor(2495867); weight=wgh+err; output; end; end; end; keep diet age replicat wgh err weight; proc print data=a; title2 'List of data - they are constructed to give a dependence of diet and age.'; proc glm data=a; class diet age replicat; model weight=diet age diet*age /solution; random diet*age /test; title2 'Analysis using proc glm.'; run;