help
help > RE: Question about ANOVA calculation in CONN (degrees-of-freedom)
Feb 4, 2021 08:02 AM | Gustavo Pamplona
RE: Question about ANOVA calculation in CONN (degrees-of-freedom)
Dear Alfonso,
Thank you for your reply, always very helpful. I had no idea that CONN performs Wilk's lambda statistics (my bad, I didn't dig into the theory that deep to find out this information). That's very interesting!
Allow me to follow up a bit on this here: is this choice (Wilk's lambda being used instead of ANOVA) justified by the fact that Wilk's lambda is more robust than ANOVA in terms of violation of the normality distribution?
Thanks a million!
Gustavo
Originally posted by Alfonso Nieto-Castanon:
Thank you for your reply, always very helpful. I had no idea that CONN performs Wilk's lambda statistics (my bad, I didn't dig into the theory that deep to find out this information). That's very interesting!
Allow me to follow up a bit on this here: is this choice (Wilk's lambda being used instead of ANOVA) justified by the fact that Wilk's lambda is more robust than ANOVA in terms of violation of the normality distribution?
Thanks a million!
Gustavo
Originally posted by Alfonso Nieto-Castanon:
Dear
Gustavo,
What you are implementing in R is the univariate approach to repeated measures ANOVA, while CONN uses a multivariate approach to repeated measures ANOVA based on Wilks' Lambda statistics. One of the main differences between these approaches is that the multivariate approach does not make any explicit assumption about the covariance structure between the conditions (the levels of the within-subjects factor), while the univariate approach typically assumes compound symmetry. For a bit more details about the multivariate approach used by CONN see
https://web.conn-toolbox.org/fmri-methods/general-linear-model
In this case (using a [1] between-subjects contrast and a [-1 1 0; 0 1 -1] between-conditions contrast) CONN is using the "LRT case 2" approach described on that site, so the second number of degrees of freedom of the F- statistic is df2 = b-a+1, where
b = rank of the design matrix (typically # of subjects - # of groups for a one-way anova)
a = rank of the between-conditions contrast matrix (typically # of levels of your within-subject factor - 1)
so that would make b=14 and a=2, so df2=13.
Hope this helps
Alfonso
Originally posted by Gustavo Pamplona:
What you are implementing in R is the univariate approach to repeated measures ANOVA, while CONN uses a multivariate approach to repeated measures ANOVA based on Wilks' Lambda statistics. One of the main differences between these approaches is that the multivariate approach does not make any explicit assumption about the covariance structure between the conditions (the levels of the within-subjects factor), while the univariate approach typically assumes compound symmetry. For a bit more details about the multivariate approach used by CONN see
https://web.conn-toolbox.org/fmri-methods/general-linear-model
In this case (using a [1] between-subjects contrast and a [-1 1 0; 0 1 -1] between-conditions contrast) CONN is using the "LRT case 2" approach described on that site, so the second number of degrees of freedom of the F- statistic is df2 = b-a+1, where
b = rank of the design matrix (typically # of subjects - # of groups for a one-way anova)
a = rank of the between-conditions contrast matrix (typically # of levels of your within-subject factor - 1)
so that would make b=14 and a=2, so df2=13.
Hope this helps
Alfonso
Originally posted by Gustavo Pamplona:
Dear Alfonso and CONN users,
I have a question concerning how the ANOVA is computed in CONN. To give a bit of context:
In a PPI analysis in which I have one group (15 subjects) and 3 conditions, I selected the "between-conditions contrast" as "any differences (F-test)" (or [-1 1 0;0 -1 1]). The connectivity between two given regions was described by the following statistics, according to CONN:
F(2,13) = 4.50, p = .03
Then, in order to double-check, I extracted each one of the 3 effects (one per condition, by selecting "any effects (F-test)" in "between-conditions contrast", then clicking on plot effects, then getting the effect values in MATLAB's command window) for the 15 subjects and wrote a model in R (aov(Contrast~Session+Error(Subj/Session),data=data)). It provided me the following statistics:
F(2,28) = 4.31, p = .02
The statistics are the similar but not the same. I see that there is a difference between the two methods in the second number of degrees of freedom (df2). The way I understand it, for within-subjects measures, it should be computed by:
df2 - df total - df subjects - df factor, in which
- df total = number of observations (across all levels of the within-subjects factor, n) – 1
- df_subjects = number of participants (N) – 1
- df_factor = number of levels (k) – 1
So, in my example: df2 = 45-1 - 15-1 - 3-1 = 44 - 14 - 2 = 28, as R indicates.
Could you please help me understand where this discrepancy comes from? Maybe from the way I'm defining the "between-conditions contrast"?
Many thanks!
Gustavo
I have a question concerning how the ANOVA is computed in CONN. To give a bit of context:
In a PPI analysis in which I have one group (15 subjects) and 3 conditions, I selected the "between-conditions contrast" as "any differences (F-test)" (or [-1 1 0;0 -1 1]). The connectivity between two given regions was described by the following statistics, according to CONN:
F(2,13) = 4.50, p = .03
Then, in order to double-check, I extracted each one of the 3 effects (one per condition, by selecting "any effects (F-test)" in "between-conditions contrast", then clicking on plot effects, then getting the effect values in MATLAB's command window) for the 15 subjects and wrote a model in R (aov(Contrast~Session+Error(Subj/Session),data=data)). It provided me the following statistics:
F(2,28) = 4.31, p = .02
The statistics are the similar but not the same. I see that there is a difference between the two methods in the second number of degrees of freedom (df2). The way I understand it, for within-subjects measures, it should be computed by:
df2 - df total - df subjects - df factor, in which
- df total = number of observations (across all levels of the within-subjects factor, n) – 1
- df_subjects = number of participants (N) – 1
- df_factor = number of levels (k) – 1
So, in my example: df2 = 45-1 - 15-1 - 3-1 = 44 - 14 - 2 = 28, as R indicates.
Could you please help me understand where this discrepancy comes from? Maybe from the way I'm defining the "between-conditions contrast"?
Many thanks!
Gustavo
Threaded View
Title | Author | Date |
---|---|---|
Gustavo Pamplona | Feb 3, 2021 | |
Gustavo Pamplona | Feb 5, 2021 | |
Alfonso Nieto-Castanon | Feb 3, 2021 | |
Gustavo Pamplona | Feb 4, 2021 | |
Alfonso Nieto-Castanon | Feb 4, 2021 | |