I have an experimental dataset that contains 2 between-subjects variables (Variable A and Variable B) and 1 within-subjects variable (Variable C). All the three variables are categorical variables with two levels. Each participant is nested within Variable A and Variable B. The data violate the assumptions of normality and homogeneity of variance-covariance matrices. So I want to use Proc Glimmix to analyze the data. I'd like to get help on how to specify the repeated measures variable (Variable C) and how to specify the random effect of each participant. I've read the information from the SAS website on Proc GLIMMIX. Unfortunately, I'm not a statistics major and all the talks on the structures of G and R are confusing to me. I've tried different things, but I'm not sure if my SAS code is correct. Any advice on how to analyze the data is greatly appreciated. My SAS code looks like the following:
proc glimmix data=datafile;
class A B participant C;
model Dep Var= A|B|C /noint link=log s dist=lognormal;
random C /group=C residual;
random _residual_ / type=un subject=participant;
run;
The dataset looks like the following:
Variable A Variable B Participant Variable C Dependent Var.
0 0 1 1 4
0 0 1 2 7
0 0 2 1 3
0 0 2 2 6
0 1 3 1 5
0 1 3 2 8
1 0 4 1 2
1 0 4 2 7
1 1 5 1 4
1 1 5 2 6
Thanks!
proc glimmix data=datafile;
class A B participant C;
model Dep Var= A|B|C /noint link=log s dist=lognormal;
random C /group=C residual;
random _residual_ / type=un subject=participant;
run;
The dataset looks like the following:
Variable A Variable B Participant Variable C Dependent Var.
0 0 1 1 4
0 0 1 2 7
0 0 2 1 3
0 0 2 2 6
0 1 3 1 5
0 1 3 2 8
1 0 4 1 2
1 0 4 2 7
1 1 5 1 4
1 1 5 2 6
Thanks!