help
help > RE: repeated measures ANOVA + covariate
Mar 22, 2023 01:03 AM | Andrew Zalesky
RE: repeated measures ANOVA + covariate
Hi Maksym,
thanks for your question and interest.
Your design matrix is almost correct. But it will be important to remove the column corresponding to age. Because this is a within-subject (repeated measures) design and age does not change between the two time points, it can be removed. Technically speaking, if age is included, the design matrix will not be full rank because the columns will not be linearly independent. This makes it difficult to find a unique solution.
In summary, I recommend removing the column for age from the design matrix. The other parts of the design matrix appear to be correct.
Best wishes and let me know if you have any other questions.
Andrew Zalesky
Originally posted by Maksym Tokariev:
thanks for your question and interest.
Your design matrix is almost correct. But it will be important to remove the column corresponding to age. Because this is a within-subject (repeated measures) design and age does not change between the two time points, it can be removed. Technically speaking, if age is included, the design matrix will not be full rank because the columns will not be linearly independent. This makes it difficult to find a unique solution.
In summary, I recommend removing the column for age from the design matrix. The other parts of the design matrix appear to be correct.
Best wishes and let me know if you have any other questions.
Andrew Zalesky
Originally posted by Maksym Tokariev:
Dear Prof. Zalesky,
I have read the forum before and it was really helpful in addressing many question. However, now I stuck with the design matrix for the NBS. I need to construct 2 x 2 repated mesures ANOVA design matrix with the age as the covariate to control for. The design has two groups and two time points (sessions). Here is an example of the design matrix for Group1 (3 subjects) and Group2 (2 subjects):
Age
Group1 Session1 Subj1 1 0 0 0 0 15.5 1 1 Of note, the real number of subjects in each group is significantly larger.
Group1 Session1 Subj2 0 1 0 0 0 11.2 1 1
Group1 Session1 Subj3 0 0 1 0 0 9.6 1 1
Group1 Session2 Subj1 1 0 0 0 0 15.5 -1 -1
Group1 Session2 Subj2 0 1 0 0 0 11.2 -1 -1
Group1 Session3 Subj3 0 0 1 0 0 9.6 -1 -1
Group2 Session1 Subj4 0 0 0 1 0 7.7 1 -1
Group2 Session1 Subj5 0 0 0 0 1 8.2 1 -1
Group2 Session2 Subj4 0 0 0 1 0 7.7 -1 1
Group2 Session2 Subj5 0 0 0 0 1 8.2 -1 1
I wonder, is this the correct way of adding the covariate? I would be grateful for any help or suggestions.
Best regards,
Maksym
I have read the forum before and it was really helpful in addressing many question. However, now I stuck with the design matrix for the NBS. I need to construct 2 x 2 repated mesures ANOVA design matrix with the age as the covariate to control for. The design has two groups and two time points (sessions). Here is an example of the design matrix for Group1 (3 subjects) and Group2 (2 subjects):
Age
Group1 Session1 Subj1 1 0 0 0 0 15.5 1 1 Of note, the real number of subjects in each group is significantly larger.
Group1 Session1 Subj2 0 1 0 0 0 11.2 1 1
Group1 Session1 Subj3 0 0 1 0 0 9.6 1 1
Group1 Session2 Subj1 1 0 0 0 0 15.5 -1 -1
Group1 Session2 Subj2 0 1 0 0 0 11.2 -1 -1
Group1 Session3 Subj3 0 0 1 0 0 9.6 -1 -1
Group2 Session1 Subj4 0 0 0 1 0 7.7 1 -1
Group2 Session1 Subj5 0 0 0 0 1 8.2 1 -1
Group2 Session2 Subj4 0 0 0 1 0 7.7 -1 1
Group2 Session2 Subj5 0 0 0 0 1 8.2 -1 1
I wonder, is this the correct way of adding the covariate? I would be grateful for any help or suggestions.
Best regards,
Maksym
Threaded View
| Title | Author | Date |
|---|---|---|
| Maksym Tokariev | Mar 21, 2023 | |
| Andrew Zalesky | Mar 22, 2023 | |
| Maksym Tokariev | Mar 22, 2023 | |
| Andrew Zalesky | Mar 22, 2023 | |
| Maksym Tokariev | Apr 17, 2023 | |
| Andrew Zalesky | Apr 18, 2023 | |
| Andrew Zalesky | Mar 22, 2023 | |
