Hi Jose,
The model is perfectly correct but the contrast is not exactly correct. That contrast is looking at any main or interaction effects combined, not just the interaction terms. To evaluate the diagnosis-by-group interaction you would use a contrast of the form:
[0 0 0 1 -1 0 -1 1 0;0 0 0 0 1 -1 0 -1 1]
(to clarify, you can get the combined contrast by using the kronecker product of the separate diagnosis and group contrasts: kron( [-1 1], [-1 1 0;0 -1 1] ) and then adding 0's at the beginning for the control terms; if, for example, you wanted to evaluate the main effect of diagnosis you would use kron( [-1 1], [1/3 1/3 1/3] ), and to evaluate the main effect of group you would use kron( [1/2 1/2], [-1 1 0; 0 -1 1] ))
Hope this helps
Alfonso
Originally posted by Jose Maximo:
Hi, I have a quesiton about my ANOVA design. I have the following 2nd-level covariates:
age: 19 25 21 21 24 23 29 35 21 25
sex: 1 0 1 1 0 1 0 1 0 1
motion: 0.2 0.3 0.2 0.4 0.3 0.4 0.4 0.1 0.1 0.2
HC: 1 1 1 1 1 0 0 0 0 0
FEP: 0 0 0 0 0 1 1 1 1 1
group1: 0 0 0 0 0 0 0 0 1 1
group2: 1 0 1 1 0 1 0 0 0 0
group4: 0 1 0 0 1 0 1 1 0 0
I wanted to run a diagnosis (HC, FEP) by group (1, 2, 4) interaction so I selected these variables and using the covariate tools I created interaction terms :
HC*group1, HC*group2, HC*group4, FEP*group1, FEP*group2, and FEP*group4
Then, on the results tab I did the following contrast to run a 2x3 ancova while controlling for age, sex, and motion:
[ 0 0 0 -1 1 0 0 0 0; 0 0 0 0 -1 1 0 0 0; 0 0 0 0 0 -1 1 0 0; 0 0 0 0 0 0 -1 1 0; 0 0 0 0 0 0 0 -1 1 ]
The first 3 zeros are for controlling for age, sex, and motion, and the rest are the variables of interest.
Is this correct? I did not get any warnings or errors so I assumed its correct, but just wanting to make sure this is correct.
Thank you.
Threaded View
Title | Author | Date |
---|---|---|
Jose Maximo | Oct 9, 2025 | |
Alfonso Nieto-Castanon | Oct 17, 2025 | |