help > Rank deficiency error in 2x2 mixed ANOVA with few repeat scans
Showing 1-4 of 4 posts
Display:
Results per page:
Jul 30, 2024  11:07 AM | Ed Hutchings
Rank deficiency error in 2x2 mixed ANOVA with few repeat scans

Hello,


Just getting in touch regarding my design matrix for a 2x2 mixed anova with few repeat measures. I understand I can’t use exchange blocks here, and my current design matrix (attached) has columns for age group, sex, age*sex, and each subject.


When I run the contrast [1 0 0 0…] to assess main effect of age group, I get a rank deficiency error. Please let me know what I’m doing wrong! Thanks for your time.


Best,


Ed

Attachment: design_matrix.txt
Jul 31, 2024  01:07 AM | Andrew Zalesky
RE: Rank deficiency error in 2x2 mixed ANOVA with few repeat scans

Hi Ed,


yes - your design matrix will throw a rank deficient warning. 


You would need to remove the main effect that is not changing between follow up measures. For example, if age group remains the same, logitudinal data is not needed to measure the main effect of age group. Check out some of the other posts on the forum where this issue is discussed in more detail. 


Another option is to move to a full-blown LME model in which individuals are modeled as random effects but that is not supported by NBS due to the computational burden of LME models. 


Andrew


Originally posted by Ed Hutchings:



Hello,


Just getting in touch regarding my design matrix for a 2x2 mixed anova with few repeat measures. I understand I can’t use exchange blocks here, and my current design matrix (attached) has columns for age group, sex, age*sex, and each subject.


When I run the contrast [1 0 0 0…] to assess main effect of age group, I get a rank deficiency error. Please let me know what I’m doing wrong! Thanks for your time.


Best,


Ed



 

Aug 5, 2024  10:08 AM | Ed Hutchings
RE: Rank deficiency error in 2x2 mixed ANOVA with few repeat scans

Hi Andrew,


Thanks very much for your reply. 


Just to be clearer about my design, I'm looking at changes in edge weight between two age groups. Some subjects are imaged in both age groups, most are not.


Since sex is unchanging over time, and is modelled by the within subject columns, I can remove the sex column from the design matrix. This leaves age, age*sex, and intra-subject dummy variables. To then test the main effect of age group I would use [1 0 0 ...]. Have I got this right?


Thanks for your help!

Aug 5, 2024  11:08 AM | Andrew Zalesky
RE: Rank deficiency error in 2x2 mixed ANOVA with few repeat scans

Yes - that sounds correct Ed.


And if you would like to test the main effect of sex, you could simply average the connectivity matrices across the two time points for each subject, and then use the averaged matrices to test for a sex effect. I.e. a longitudinal design is not really needed to test for the main effect of sex because sex does not change between the two time points. 


Best wishes, 


Andrew


Originally posted by Ed Hutchings:



Hi Andrew,


Thanks very much for your reply. 


Just to be clearer about my design, I'm looking at changes in edge weight between two age groups. Some subjects are imaged in both age groups, most are not.


Since sex is unchanging over time, and is modelled by the within subject columns, I can remove the sex column from the design matrix. This leaves age, age*sex, and intra-subject dummy variables. To then test the main effect of age group I would use [1 0 0 ...]. Have I got this right?


Thanks for your help!