open-discussion
open-discussion > RE: how to control for covariance
Jan 8, 2015 02:01 PM | Martin Styner
RE: how to control for covariance
Hi Chao
The output actually looks correct to me.
The testing procedure first computes a GLM. That GLM is the same whether you use a group or interaction test, the betas are exactly the same.
The difference between the group and interaction test is in the MANCOVA matrixes. Refering to the notation used in Beatriz's Insight journal article on shapeAnalysisMANCOVA (with AB = C where B is the parameter estimate matrix), matrixes A and C are different. For a group test, A will have 2 rows, one for each group, whereas the interaction test has only one row for A, which is all zeros except for the column with the interaction variable (testing whether the beta for that variable is significantly from zero).
The permutation testing is also slightly different for group and interaction tests. The interaction test permutation is simple, it is done by simply permuting that given variable and keeping all other information the same. The group testing works the same way if you have only one group variable (such as in your case). In case of multiple group variable, it is a bit more complicated in that permutation only happen within subgroups. So, if you have 2 group variables, lets say gender and diagnosis and test for diagnosis. Then the diagnosis group information is only permuted within each gender group (so the diagnosis group information is permuted for males only within the male subjects, and the same for female subjects). The current implementation only supports 2 group variables btw.
Can you give me more information why you think a group test is done? Does the output look the same as the group test output (with testColumn 1)?
Martin
The output actually looks correct to me.
The testing procedure first computes a GLM. That GLM is the same whether you use a group or interaction test, the betas are exactly the same.
The difference between the group and interaction test is in the MANCOVA matrixes. Refering to the notation used in Beatriz's Insight journal article on shapeAnalysisMANCOVA (with AB = C where B is the parameter estimate matrix), matrixes A and C are different. For a group test, A will have 2 rows, one for each group, whereas the interaction test has only one row for A, which is all zeros except for the column with the interaction variable (testing whether the beta for that variable is significantly from zero).
The permutation testing is also slightly different for group and interaction tests. The interaction test permutation is simple, it is done by simply permuting that given variable and keeping all other information the same. The group testing works the same way if you have only one group variable (such as in your case). In case of multiple group variable, it is a bit more complicated in that permutation only happen within subgroups. So, if you have 2 group variables, lets say gender and diagnosis and test for diagnosis. Then the diagnosis group information is only permuted within each gender group (so the diagnosis group information is permuted for males only within the male subjects, and the same for female subjects). The current implementation only supports 2 group variables btw.
Can you give me more information why you think a group test is done? Does the output look the same as the group test output (with testColumn 1)?
Martin
Threaded View
Title | Author | Date |
---|---|---|
Chao Suo | Dec 8, 2014 | |
Beatriz Paniagua | Dec 11, 2014 | |
Olof Lindberg | Feb 6, 2015 | |
Martin Styner | Feb 6, 2015 | |
Chao Suo | Dec 17, 2014 | |
Martin Styner | Dec 17, 2014 | |
Chao Suo | Dec 18, 2014 | |
Martin Styner | Dec 18, 2014 | |
Chao Suo | Jan 8, 2015 | |
Martin Styner | Jan 8, 2015 | |
Chao Suo | Jan 9, 2015 | |
Martin Styner | Jan 9, 2015 | |
Martin Styner | Dec 18, 2014 | |
Olof Lindberg | Dec 11, 2014 | |
Beatriz Paniagua | Dec 16, 2014 | |
Olof Lindberg | Dec 16, 2014 | |
Martin Styner | Dec 16, 2014 | |