help
help > RE: ANCOVA rank deficient
May 12, 2016 12:05 AM | Andrew Zalesky
RE: ANCOVA rank deficient
Hi Giulia,
Use the following design matrix
1 1 0 27
1 1 1 31
1 1 0 43
1 0 1 56
1 0 0 22
1 0 1 34
The 1st column is intercept, 2nd is patient or control; 3rd is gender and 4th is age.
To test for a between-group difference, use a "t-test" and the contrast:
[0 1 0 0]
or
[0 -1 0 0]
The first one is patients > controls and the second is patients < controls.
Andrew
Originally posted by Giulia Forcellini:
Use the following design matrix
1 1 0 27
1 1 1 31
1 1 0 43
1 0 1 56
1 0 0 22
1 0 1 34
The 1st column is intercept, 2nd is patient or control; 3rd is gender and 4th is age.
To test for a between-group difference, use a "t-test" and the contrast:
[0 1 0 0]
or
[0 -1 0 0]
The first one is patients > controls and the second is patients < controls.
Andrew
Originally posted by Giulia Forcellini:
Dear NBS' users,
I am running an analysis with two groups (HC and patients) where I want to control for age and gender.
This is a short example of the matrix I am using to do so:
1 1 0 -1 0.5
1 1 0 1 -05
1 1 0 -1 0.5
1 0 1 1 -05
1 0 1 1 -05
1 0 1 -1 0.5
Where the first column is the intercept, the second column the first group, 3rd the second group, 4th column is gender and 5th age (demeaned).
My contrast would be [0 1 -1 0 0] running an F-test.
Now, when I run the analysis with these settings MATLAB gives me the following warning:
Warning: Rank deficient, rank = 4, tol = 1.154632e-14.
Is it possible this is caused by the sample size being too small (HC=26, patients=26)?
What else could the problem be? How is it possible to solve this?
Thank you so much!
Best,
Giulia
I am running an analysis with two groups (HC and patients) where I want to control for age and gender.
This is a short example of the matrix I am using to do so:
1 1 0 -1 0.5
1 1 0 1 -05
1 1 0 -1 0.5
1 0 1 1 -05
1 0 1 1 -05
1 0 1 -1 0.5
Where the first column is the intercept, the second column the first group, 3rd the second group, 4th column is gender and 5th age (demeaned).
My contrast would be [0 1 -1 0 0] running an F-test.
Now, when I run the analysis with these settings MATLAB gives me the following warning:
Warning: Rank deficient, rank = 4, tol = 1.154632e-14.
Is it possible this is caused by the sample size being too small (HC=26, patients=26)?
What else could the problem be? How is it possible to solve this?
Thank you so much!
Best,
Giulia
Threaded View
Title | Author | Date |
---|---|---|
Giulia Forcellini | May 11, 2016 | |
Andrew Zalesky | May 12, 2016 | |
Ru-Kai Chen | Sep 1, 2024 | |
Andrew Zalesky | Sep 1, 2024 | |
Ru-Kai Chen | Sep 1, 2024 | |
Andrew Zalesky | Sep 1, 2024 | |
Ru-Kai Chen | Sep 4, 2024 | |
Andrew Zalesky | Sep 4, 2024 | |
Ru-Kai Chen | Sep 4, 2024 | |
Juan Pablo Princich | Dec 7, 2017 | |
Andrew Zalesky | Dec 7, 2017 | |
Juan Pablo Princich | Dec 13, 2017 | |
Juan Pablo Princich | Dec 18, 2017 | |
Juan Pablo Princich | Aug 20, 2016 | |
Andrew Zalesky | Aug 22, 2016 | |