data a; infile 'E:\Reading\Teaching\MSCMDS_2005\DataFiles\rattox.dat'; input group treat sex animal day weight; day_2=day*day; run; /*--------------------------------------------------------------------- | RATTOX.SAS : Rat toxicology data. | | | | The treatments are : 1 = control, 2 = compound A at 4mg, | | 3 = A at 20mg, 4 = A at 100mg and 5 is compound B at 100mg. | | | | Sex is as follows : 1 = males, 2 = females. | | | | Groups are as follows : 1 to 5 are males on treatments 1 to 5 | | 6 to 10 are females on treatments 1 to 5. | |--------------------------------------------------------------------*/ proc print; run; proc mixed covtest; class group treat sex animal; model weight= day group*day/ s chisq; random int day / subject= animal(group) type=un g; run; proc mixed covtest; class group treat sex animal; model weight= day group group*day day_2 group*day_2/ s chisq; random int day day_2 / subject= animal(group) type=un g; run;