I am doing repeated measure analysis in SAS and I am comparing the differences in the covariance structure information criteria. Rather than just doing each individual analysis I am looking for a way to loop through them and save the outputs to a table.
Here is a sample of the data;
Data dta;
input A Subject B Y;
datalines;
1 1 1 3
1 1 2 4
1 1 3 7
1 1 4 7
1 2 1 6
1 2 2 5
1 2 3 8
1 2 4 8
2 3 1 1
2 3 2 2
2 3 3 5
2 3 4 10
2 4 1 2
2 4 2 3
2 4 3 6
2 4 4 10
;
run;
ods output InfoCrit = Output;
proc mixed data=dta ic covtest ;
class A Subject B;
model Y = A B A*B/DDFM=BW S;
Repeated B / Subject=subject Type=CS;
run;
I would like to loop through the Type= in the repeated measurement part with AR(1), ARH(1), CS, CSH, HF, TOEP, and UNR. Below is the output from Type=CS.
Neg2LogLike Parms AIC AICC HQIC BIC CAIC
23.3 2 27.3 29.7 24.6 26.1 28.1
I would also like to add a new column for Type for each iteration of the do-loop;
Type Neg2LogLike Parms AIC AICC HQIC BIC CAIC
CS 23.3 2 27.3 29.7 24.6 26.1 28.1
AR(1) 22.9 2 26.9 29.3 24.2 25.7 27.7
So far I have been able to use ods output to save the table and I have been able to manually change the Type= and append that output to a new table but I have been unsuccessful in implement the do loop to automate it.