Comparison of brain responses under three different conditions?

Hi all,

I would need to find the time intervals where there are statistically
significant differences between MEG responses measured under three
different conditions. I study the responses by comparing the mean values
in steps of 200 ms between the range of 400-2400 ms. I would like to do
this for responses from several brain areas. What could be the best way to
compare the mean values of the tree responses?

I have planned to try f_twoway_rm in a loop. However, when rmANOVA is used,
sphericity test is needed, and if the assumption of sphericity is violated,
p values need to be corrected. Is there any function for this in Python
(e.g. Mauchly's sphericity test and Greenhouse-Geisser test)?

Many thanks already in advance!

Regards,
Maria
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20141221/df8a8701/attachment.html

Hi Maria,

2014-12-21 10:18 GMT+01:00 Maria Hakonen <maria.hakonen at gmail.com>:

Hi all,

I would need to find the time intervals where there are statistically
significant differences between MEG responses measured under three
different conditions. I study the responses by comparing the mean values
in steps of 200 ms between the range of 400-2400 ms. I would like to do
this for responses from several brain areas. What could be the best way to
compare the mean values of the tree responses?

Single subject or group level?
For single subject a standard F-test would be appropriate. For groups a
oneway repeated measures ANOVA, if I understand your design correctly
(simply 3 different conditions).

I have planned to try f_twoway_rm in a loop. However, when rmANOVA is
used, sphericity test is needed, and if the assumption of sphericity is
violated, p values need to be corrected. Is there any function for this in
Python (e.g. Mauchly's sphericity test and Greenhouse-Geisser test)?

Note that this only needed if you have more than 2 factors with more than
two levels. Currently this is not implemented in our stats code. The other
questions is why you need a 2-way test for 3 conditions. I probably did not
fully understand your design.

Denis

Many thanks already in advance!

Regards,
Maria

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom it
is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to you in
error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20141221/0d4fa78d/attachment.html

Hi Denis,

Should I use two-way ANOVA if I also want to compare hemispheres, i.e. have
a 2*3 (hemisphere*session) ANOVA table?
I would need to do group level analysis.

-Maria

2014-12-21 12:38 GMT+02:00 Denis-Alexander Engemann <
denis.engemann at gmail.com>:

Hi Maria,

2014-12-21 10:18 GMT+01:00 Maria Hakonen <maria.hakonen at gmail.com>:

Hi all,

I would need to find the time intervals where there are statistically
significant differences between MEG responses measured under three
different conditions. I study the responses by comparing the mean values
in steps of 200 ms between the range of 400-2400 ms. I would like to do
this for responses from several brain areas. What could be the best way to
compare the mean values of the tree responses?

Single subject or group level?
For single subject a standard F-test would be appropriate. For groups a
oneway repeated measures ANOVA, if I understand your design correctly
(simply 3 different conditions).

I have planned to try f_twoway_rm in a loop. However, when rmANOVA is
used, sphericity test is needed, and if the assumption of sphericity is
violated, p values need to be corrected. Is there any function for this in
Python (e.g. Mauchly's sphericity test and Greenhouse-Geisser test)?

Note that this only needed if you have more than 2 factors with more than
two levels. Currently this is not implemented in our stats code. The other
questions is why you need a 2-way test for 3 conditions. I probably did not
fully understand your design.

Denis

Many thanks already in advance!

Regards,
Maria

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom it
is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to you
in error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom it
is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to you in
error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20141221/dd77f980/attachment.html

Hi Maria,

Hi Denis,

Should I use two-way ANOVA if I also want to compare hemispheres, i.e. have a 2*3 (hemisphere*session) ANOVA table?

Sounds like the repeated measures anova is what you want to do here indeed. I just realized the sphericity correction is actually implemented by our code. So that should fly. Checkout the correction parameter.

I would need to do group level analysis.

-Maria

2014-12-21 12:38 GMT+02:00 Denis-Alexander Engemann <denis.engemann at gmail.com>:

Hi Maria,

2014-12-21 10:18 GMT+01:00 Maria Hakonen <maria.hakonen at gmail.com>:

Hi all,

I would need to find the time intervals where there are statistically significant differences between MEG responses measured under three different conditions. I study the responses by comparing the mean values in steps of 200 ms between the range of 400-2400 ms. I would like to do this for responses from several brain areas. What could be the best way to compare the mean values of the tree responses?

Single subject or group level?
For single subject a standard F-test would be appropriate. For groups a oneway repeated measures ANOVA, if I understand your design correctly (simply 3 different conditions).

I have planned to try f_twoway_rm in a loop. However, when rmANOVA is used, sphericity test is needed, and if the assumption of sphericity is violated, p values need to be corrected. Is there any function for this in Python (e.g. Mauchly's sphericity test and Greenhouse-Geisser test)?

Note that this only needed if you have more than 2 factors with more than two levels. Currently this is not implemented in our stats code. The other questions is why you need a 2-way test for 3 conditions. I probably did not fully understand your design.

Denis

Many thanks already in advance!

Regards,
Maria

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20141221/eaf7816d/attachment.html

Hi,

Is it that when I have hemisphere*session ANOVAs, I can use f_twoway_rm,
and this gives the corrected values?
Should one-way ANOVA be used in the cases where I am not interested in
hemisperic asymmetry? Is there any function for one way ANOVA that gives
sphericity corrected values?

-Maria

2014-12-21 14:21 GMT+02:00 Denis A. Engemann <denis.engemann at gmail.com>:

Hi Maria,

Hi Denis,

Should I use two-way ANOVA if I also want to compare hemispheres, i.e.
have a 2*3 (hemisphere*session) ANOVA table?

Sounds like the repeated measures anova is what you want to do here
indeed. I just realized the sphericity correction is actually implemented
by our code. So that should fly. Checkout the correction parameter.

I would need to do group level analysis.

-Maria

2014-12-21 12:38 GMT+02:00 Denis-Alexander Engemann <
denis.engemann at gmail.com>:

Hi Maria,

2014-12-21 10:18 GMT+01:00 Maria Hakonen <maria.hakonen at gmail.com>:

Hi all,

I would need to find the time intervals where there are statistically
significant differences between MEG responses measured under three
different conditions. I study the responses by comparing the mean values
in steps of 200 ms between the range of 400-2400 ms. I would like to do
this for responses from several brain areas. What could be the best way to
compare the mean values of the tree responses?

Single subject or group level?
For single subject a standard F-test would be appropriate. For groups a
oneway repeated measures ANOVA, if I understand your design correctly
(simply 3 different conditions).

I have planned to try f_twoway_rm in a loop. However, when rmANOVA is
used, sphericity test is needed, and if the assumption of sphericity is
violated, p values need to be corrected. Is there any function for this in
Python (e.g. Mauchly's sphericity test and Greenhouse-Geisser test)?

Note that this only needed if you have more than 2 factors with more than
two levels. Currently this is not implemented in our stats code. The other
questions is why you need a 2-way test for 3 conditions. I probably did not
fully understand your design.

Denis

Many thanks already in advance!

Regards,
Maria

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis

The information in this e-mail is intended only for the person to whom
it is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you
in error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis

The information in this e-mail is intended only for the person to whom it
is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you
in error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis

The information in this e-mail is intended only for the person to whom it
is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in
error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis

The information in this e-mail is intended only for the person to whom it
is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in
error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20141221/344bfeaf/attachment.html

2014-12-21 14:00 GMT+01:00 Maria Hakonen <maria.hakonen at gmail.com>:

Hi,

Is it that when I have hemisphere*session ANOVAs, I can use f_twoway_rm,
and this gives the corrected values?

with correction=True

Should one-way ANOVA be used in the cases where I am not interested in
hemisperic asymmetry? Is there any function for one way ANOVA that gives
sphericity corrected values?

A one-way ANOVA is currently not implemented. But you can just look at the
relevant main effect. Should be equivalent.

-Maria

2014-12-21 14:21 GMT+02:00 Denis A. Engemann <denis.engemann at gmail.com>:

Hi Maria,

Hi Denis,

Should I use two-way ANOVA if I also want to compare hemispheres, i.e.
have a 2*3 (hemisphere*session) ANOVA table?

Sounds like the repeated measures anova is what you want to do here
indeed. I just realized the sphericity correction is actually implemented
by our code. So that should fly. Checkout the correction parameter.

I would need to do group level analysis.

-Maria

2014-12-21 12:38 GMT+02:00 Denis-Alexander Engemann <
denis.engemann at gmail.com>:

Hi Maria,

2014-12-21 10:18 GMT+01:00 Maria Hakonen <maria.hakonen at gmail.com>:

Hi all,

I would need to find the time intervals where there are statistically
significant differences between MEG responses measured under three
different conditions. I study the responses by comparing the mean values
in steps of 200 ms between the range of 400-2400 ms. I would like to do
this for responses from several brain areas. What could be the best way to
compare the mean values of the tree responses?

Single subject or group level?
For single subject a standard F-test would be appropriate. For groups a
oneway repeated measures ANOVA, if I understand your design correctly
(simply 3 different conditions).

I have planned to try f_twoway_rm in a loop. However, when rmANOVA is
used, sphericity test is needed, and if the assumption of sphericity is
violated, p values need to be corrected. Is there any function for this in
Python (e.g. Mauchly's sphericity test and Greenhouse-Geisser test)?

Note that this only needed if you have more than 2 factors with more
than two levels. Currently this is not implemented in our stats code. The
other questions is why you need a 2-way test for 3 conditions. I probably
did not fully understand your design.

Denis

Many thanks already in advance!

Regards,
Maria

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom
it is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to you
in error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom
it is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to you
in error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom it
is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to you
in error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom it
is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to you
in error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom it
is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to you in
error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20141221/3d74dd19/attachment.html

Hi Denis,

Are you sure that the sphericity correction is implemented by f_twoway_rm?
I tested it with data where the assumption of sphericity is violated. I
calculated p values with Statistica and corrected them using the
lower-bound estimate, Greenhouse-Geisser correction and the Huynh-Feldt
correction. However, the p-values given by f_twoway_rm were equal with the
uncorrected values I calculated with Statistica. I used f_twoway_rm as:

[f,p]=f_twoway_rm(data,factor_levels=[2,3])

where data is hemisphere*sesion ANOVA table.

-Maria

2014-12-21 15:08 GMT+02:00 Denis-Alexander Engemann <
denis.engemann at gmail.com>:

2014-12-21 14:00 GMT+01:00 Maria Hakonen <maria.hakonen at gmail.com>:

Hi,

Is it that when I have hemisphere*session ANOVAs, I can use f_twoway_rm,
and this gives the corrected values?

with correction=True

Should one-way ANOVA be used in the cases where I am not interested in
hemisperic asymmetry? Is there any function for one way ANOVA that gives
sphericity corrected values?

A one-way ANOVA is currently not implemented. But you can just look at the
relevant main effect. Should be equivalent.

-Maria

2014-12-21 14:21 GMT+02:00 Denis A. Engemann <denis.engemann at gmail.com>:

Hi Maria,

Hi Denis,

Should I use two-way ANOVA if I also want to compare hemispheres, i.e.
have a 2*3 (hemisphere*session) ANOVA table?

Sounds like the repeated measures anova is what you want to do here
indeed. I just realized the sphericity correction is actually implemented
by our code. So that should fly. Checkout the correction parameter.

I would need to do group level analysis.

-Maria

2014-12-21 12:38 GMT+02:00 Denis-Alexander Engemann <
denis.engemann at gmail.com>:

Hi Maria,

2014-12-21 10:18 GMT+01:00 Maria Hakonen <maria.hakonen at gmail.com>:

Hi all,

I would need to find the time intervals where there are statistically
significant differences between MEG responses measured under three
different conditions. I study the responses by comparing the mean values
in steps of 200 ms between the range of 400-2400 ms. I would like to do
this for responses from several brain areas. What could be the best way to
compare the mean values of the tree responses?

Single subject or group level?
For single subject a standard F-test would be appropriate. For groups a
oneway repeated measures ANOVA, if I understand your design correctly
(simply 3 different conditions).

I have planned to try f_twoway_rm in a loop. However, when rmANOVA is
used, sphericity test is needed, and if the assumption of sphericity is
violated, p values need to be corrected. Is there any function for this in
Python (e.g. Mauchly's sphericity test and Greenhouse-Geisser test)?

Note that this only needed if you have more than 2 factors with more
than two levels. Currently this is not implemented in our stats code. The
other questions is why you need a 2-way test for 3 conditions. I probably
did not fully understand your design.

Denis

Many thanks already in advance!

Regards,
Maria

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom
it is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to
you in error
but does not contain patient information, please contact the sender
and properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom
it is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to you
in error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom
it is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to you
in error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom
it is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to you
in error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom it
is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to you
in error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom it
is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to you in
error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20141221/982bf7d4/attachment.html

[f,p]=f_twoway_rm(data,factor_levels=[2,3], correction=True)

2014-12-21 15:45 GMT+01:00 Maria Hakonen <maria.hakonen at gmail.com>:

Hi Denis,

Are you sure that the sphericity correction is implemented by f_twoway_rm?
I tested it with data where the assumption of sphericity is violated. I
calculated p values with Statistica and corrected them using the
lower-bound estimate, Greenhouse-Geisser correction and the Huynh-Feldt
correction. However, the p-values given by f_twoway_rm were equal with the
uncorrected values I calculated with Statistica. I used f_twoway_rm as:

[f,p]=f_twoway_rm(data,factor_levels=[2,3])

where data is hemisphere*sesion ANOVA table.

-Maria

2014-12-21 15:08 GMT+02:00 Denis-Alexander Engemann <
denis.engemann at gmail.com>:

2014-12-21 14:00 GMT+01:00 Maria Hakonen <maria.hakonen at gmail.com>:

Hi,

Is it that when I have hemisphere*session ANOVAs, I can use f_twoway_rm,
and this gives the corrected values?

with correction=True

Should one-way ANOVA be used in the cases where I am not interested in
hemisperic asymmetry? Is there any function for one way ANOVA that gives
sphericity corrected values?

A one-way ANOVA is currently not implemented. But you can just look at
the relevant main effect. Should be equivalent.

-Maria

2014-12-21 14:21 GMT+02:00 Denis A. Engemann <denis.engemann at gmail.com>:

Hi Maria,

Hi Denis,

Should I use two-way ANOVA if I also want to compare hemispheres, i.e.
have a 2*3 (hemisphere*session) ANOVA table?

Sounds like the repeated measures anova is what you want to do here
indeed. I just realized the sphericity correction is actually implemented
by our code. So that should fly. Checkout the correction parameter.

I would need to do group level analysis.

-Maria

2014-12-21 12:38 GMT+02:00 Denis-Alexander Engemann <
denis.engemann at gmail.com>:

Hi Maria,

2014-12-21 10:18 GMT+01:00 Maria Hakonen <maria.hakonen at gmail.com>:

Hi all,

I would need to find the time intervals where there are statistically
significant differences between MEG responses measured under three
different conditions. I study the responses by comparing the mean values
in steps of 200 ms between the range of 400-2400 ms. I would like to do
this for responses from several brain areas. What could be the best way to
compare the mean values of the tree responses?

Single subject or group level?
For single subject a standard F-test would be appropriate. For groups
a oneway repeated measures ANOVA, if I understand your design correctly
(simply 3 different conditions).

I have planned to try f_twoway_rm in a loop. However, when rmANOVA is
used, sphericity test is needed, and if the assumption of sphericity is
violated, p values need to be corrected. Is there any function for this in
Python (e.g. Mauchly's sphericity test and Greenhouse-Geisser test)?

Note that this only needed if you have more than 2 factors with more
than two levels. Currently this is not implemented in our stats code. The
other questions is why you need a 2-way test for 3 conditions. I probably
did not fully understand your design.

Denis

Many thanks already in advance!

Regards,
Maria

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to
whom it is
addressed. If you believe this e-mail was sent to you in error and
the e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to
you in error
but does not contain patient information, please contact the sender
and properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom
it is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to
you in error
but does not contain patient information, please contact the sender
and properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom
it is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to you
in error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom
it is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to you
in error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom
it is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to you
in error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom it
is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to you
in error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom it
is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to you in
error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20141221/223befc9/attachment.html

Should be Greenhouse-Geisser,
also see source code:

2014-12-21 15:47 GMT+01:00 Denis-Alexander Engemann <
denis.engemann at gmail.com>:

[f,p]=f_twoway_rm(data,factor_levels=[2,3], correction=True)

2014-12-21 15:45 GMT+01:00 Maria Hakonen <maria.hakonen at gmail.com>:

Hi Denis,

Are you sure that the sphericity correction is implemented by f_twoway_rm?
I tested it with data where the assumption of sphericity is violated. I
calculated p values with Statistica and corrected them using the
lower-bound estimate, Greenhouse-Geisser correction and the Huynh-Feldt
correction. However, the p-values given by f_twoway_rm were equal with the
uncorrected values I calculated with Statistica. I used f_twoway_rm as:

[f,p]=f_twoway_rm(data,factor_levels=[2,3])

where data is hemisphere*sesion ANOVA table.

-Maria

2014-12-21 15:08 GMT+02:00 Denis-Alexander Engemann <
denis.engemann at gmail.com>:

2014-12-21 14:00 GMT+01:00 Maria Hakonen <maria.hakonen at gmail.com>:

Hi,

Is it that when I have hemisphere*session ANOVAs, I can use
f_twoway_rm, and this gives the corrected values?

with correction=True

Should one-way ANOVA be used in the cases where I am not interested in
hemisperic asymmetry? Is there any function for one way ANOVA that gives
sphericity corrected values?

A one-way ANOVA is currently not implemented. But you can just look at
the relevant main effect. Should be equivalent.

-Maria

2014-12-21 14:21 GMT+02:00 Denis A. Engemann <denis.engemann at gmail.com>
:

Hi Maria,

Hi Denis,

Should I use two-way ANOVA if I also want to compare hemispheres, i.e.
have a 2*3 (hemisphere*session) ANOVA table?

Sounds like the repeated measures anova is what you want to do here
indeed. I just realized the sphericity correction is actually implemented
by our code. So that should fly. Checkout the correction parameter.

I would need to do group level analysis.

-Maria

2014-12-21 12:38 GMT+02:00 Denis-Alexander Engemann <
denis.engemann at gmail.com>:

Hi Maria,

2014-12-21 10:18 GMT+01:00 Maria Hakonen <maria.hakonen at gmail.com>:

Hi all,

I would need to find the time intervals where there are
statistically significant differences between MEG responses measured under
three different conditions. I study the responses by comparing the mean
values in steps of 200 ms between the range of 400-2400 ms. I would like to
do this for responses from several brain areas. What could be the best way
to compare the mean values of the tree responses?

Single subject or group level?
For single subject a standard F-test would be appropriate. For groups
a oneway repeated measures ANOVA, if I understand your design correctly
(simply 3 different conditions).

I have planned to try f_twoway_rm in a loop. However, when rmANOVA
is used, sphericity test is needed, and if the assumption of sphericity is
violated, p values need to be corrected. Is there any function for this in
Python (e.g. Mauchly's sphericity test and Greenhouse-Geisser test)?

Note that this only needed if you have more than 2 factors with more
than two levels. Currently this is not implemented in our stats code. The
other questions is why you need a 2-way test for 3 conditions. I probably
did not fully understand your design.

Denis

Many thanks already in advance!

Regards,
Maria

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to
whom it is
addressed. If you believe this e-mail was sent to you in error and
the e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to
you in error
but does not contain patient information, please contact the sender
and properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to
whom it is
addressed. If you believe this e-mail was sent to you in error and
the e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to
you in error
but does not contain patient information, please contact the sender
and properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom
it is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to
you in error
but does not contain patient information, please contact the sender
and properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom
it is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to
you in error
but does not contain patient information, please contact the sender
and properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom
it is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to you
in error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom
it is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to you
in error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom it
is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to you
in error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20141221/5e3b2507/attachment.html

Hi Denis,

I tried that and got the following p values: 0.02993846, 0.47414992
The corresponding Greenhouse-Geisser corrected values computed with
Statistica were: 0.026775, 0.462423.
Huynh-Feldt correction gives 0.023894, 0.473539 and lower-bound correction
0.036458, 0.427778

The uncorrected values calculated with Statistica and Python are equal but
also the corrected values are almost equal. So, maybe f_twoway_rm works
correctly now?

It would also be interesting to do post-hoc comparisons between conditions
but I think that Python doesn't have function for post-hoc test, or at
least I didn't found it?

-Maria

2014-12-21 16:49 GMT+02:00 Denis-Alexander Engemann <
denis.engemann at gmail.com>:

Should be Greenhouse-Geisser,
also see source code:

https://github.com/mne-tools/mne-python/blob/master/mne/stats/parametric.py#L249

2014-12-21 15:47 GMT+01:00 Denis-Alexander Engemann <
denis.engemann at gmail.com>:

[f,p]=f_twoway_rm(data,factor_levels=[2,3], correction=True)

2014-12-21 15:45 GMT+01:00 Maria Hakonen <maria.hakonen at gmail.com>:

Hi Denis,

Are you sure that the sphericity correction is implemented by
f_twoway_rm?
I tested it with data where the assumption of sphericity is violated. I
calculated p values with Statistica and corrected them using the
lower-bound estimate, Greenhouse-Geisser correction and the Huynh-Feldt
correction. However, the p-values given by f_twoway_rm were equal with the
uncorrected values I calculated with Statistica. I used f_twoway_rm as:

[f,p]=f_twoway_rm(data,factor_levels=[2,3])

where data is hemisphere*sesion ANOVA table.

-Maria

2014-12-21 15:08 GMT+02:00 Denis-Alexander Engemann <
denis.engemann at gmail.com>:

2014-12-21 14:00 GMT+01:00 Maria Hakonen <maria.hakonen at gmail.com>:

Hi,

Is it that when I have hemisphere*session ANOVAs, I can use
f_twoway_rm, and this gives the corrected values?

with correction=True

Should one-way ANOVA be used in the cases where I am not interested in
hemisperic asymmetry? Is there any function for one way ANOVA that gives
sphericity corrected values?

A one-way ANOVA is currently not implemented. But you can just look at
the relevant main effect. Should be equivalent.

-Maria

2014-12-21 14:21 GMT+02:00 Denis A. Engemann <denis.engemann at gmail.com
>:

Hi Maria,

Hi Denis,

Should I use two-way ANOVA if I also want to compare hemispheres,
i.e. have a 2*3 (hemisphere*session) ANOVA table?

Sounds like the repeated measures anova is what you want to do here
indeed. I just realized the sphericity correction is actually implemented
by our code. So that should fly. Checkout the correction parameter.

I would need to do group level analysis.

-Maria

2014-12-21 12:38 GMT+02:00 Denis-Alexander Engemann <
denis.engemann at gmail.com>:

Hi Maria,

2014-12-21 10:18 GMT+01:00 Maria Hakonen <maria.hakonen at gmail.com>:

Hi all,

I would need to find the time intervals where there are
statistically significant differences between MEG responses measured under
three different conditions. I study the responses by comparing the mean
values in steps of 200 ms between the range of 400-2400 ms. I would like to
do this for responses from several brain areas. What could be the best way
to compare the mean values of the tree responses?

Single subject or group level?
For single subject a standard F-test would be appropriate. For
groups a oneway repeated measures ANOVA, if I understand your design
correctly (simply 3 different conditions).

I have planned to try f_twoway_rm in a loop. However, when rmANOVA
is used, sphericity test is needed, and if the assumption of sphericity is
violated, p values need to be corrected. Is there any function for this in
Python (e.g. Mauchly's sphericity test and Greenhouse-Geisser test)?

Note that this only needed if you have more than 2 factors with more
than two levels. Currently this is not implemented in our stats code. The
other questions is why you need a 2-way test for 3 conditions. I probably
did not fully understand your design.

Denis

Many thanks already in advance!

Regards,
Maria

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to
whom it is
addressed. If you believe this e-mail was sent to you in error and
the e-mail
contains patient information, please contact the Partners
Compliance HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to
you in error
but does not contain patient information, please contact the sender
and properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to
whom it is
addressed. If you believe this e-mail was sent to you in error and
the e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to
you in error
but does not contain patient information, please contact the sender
and properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to
whom it is
addressed. If you believe this e-mail was sent to you in error and
the e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to
you in error
but does not contain patient information, please contact the sender
and properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to
whom it is
addressed. If you believe this e-mail was sent to you in error and
the e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to
you in error
but does not contain patient information, please contact the sender
and properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom
it is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to
you in error
but does not contain patient information, please contact the sender
and properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom
it is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to you
in error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom
it is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to you
in error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom it
is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to you in
error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20141221/ac6eb5fd/attachment.html

Hi Maria,

2014-12-21 16:35 GMT+01:00 Maria Hakonen <maria.hakonen at gmail.com>:

Hi Denis,

I tried that and got the following p values: 0.02993846, 0.47414992
The corresponding Greenhouse-Geisser corrected values computed with
Statistica were: 0.026775, 0.462423.
Huynh-Feldt correction gives 0.023894, 0.473539 and lower-bound
correction 0.036458, 0.427778

The uncorrected values calculated with Statistica and Python are equal but
also the corrected values are almost equal. So, maybe f_twoway_rm works
correctly now?

There might be some minor implementation-related difference, would be good
to investigate.
Generally the ANOVA function is tested against R and SPSS, event for the
correction:

I would therefore trust the results.

It would also be interesting to do post-hoc comparisons between conditions
but I think that Python doesn't have function for post-hoc test, or at
least I didn't found it?

What do you mean? You simply compute paired t-tests and correct the alpha.

-Denis

-Maria

2014-12-21 16:49 GMT+02:00 Denis-Alexander Engemann <
denis.engemann at gmail.com>:

Should be Greenhouse-Geisser,
also see source code:

https://github.com/mne-tools/mne-python/blob/master/mne/stats/parametric.py#L249

2014-12-21 15:47 GMT+01:00 Denis-Alexander Engemann <
denis.engemann at gmail.com>:

[f,p]=f_twoway_rm(data,factor_levels=[2,3], correction=True)

2014-12-21 15:45 GMT+01:00 Maria Hakonen <maria.hakonen at gmail.com>:

Hi Denis,

Are you sure that the sphericity correction is implemented by
f_twoway_rm?
I tested it with data where the assumption of sphericity is violated. I
calculated p values with Statistica and corrected them using the
lower-bound estimate, Greenhouse-Geisser correction and the Huynh-Feldt
correction. However, the p-values given by f_twoway_rm were equal with the
uncorrected values I calculated with Statistica. I used f_twoway_rm as:

[f,p]=f_twoway_rm(data,factor_levels=[2,3])

where data is hemisphere*sesion ANOVA table.

-Maria

2014-12-21 15:08 GMT+02:00 Denis-Alexander Engemann <
denis.engemann at gmail.com>:

2014-12-21 14:00 GMT+01:00 Maria Hakonen <maria.hakonen at gmail.com>:

Hi,

Is it that when I have hemisphere*session ANOVAs, I can use
f_twoway_rm, and this gives the corrected values?

with correction=True

Should one-way ANOVA be used in the cases where I am not interested
in hemisperic asymmetry? Is there any function for one way ANOVA that gives
sphericity corrected values?

A one-way ANOVA is currently not implemented. But you can just look at
the relevant main effect. Should be equivalent.

-Maria

2014-12-21 14:21 GMT+02:00 Denis A. Engemann <
denis.engemann at gmail.com>:

Hi Maria,

Hi Denis,

Should I use two-way ANOVA if I also want to compare hemispheres,
i.e. have a 2*3 (hemisphere*session) ANOVA table?

Sounds like the repeated measures anova is what you want to do here
indeed. I just realized the sphericity correction is actually implemented
by our code. So that should fly. Checkout the correction parameter.

I would need to do group level analysis.

-Maria

2014-12-21 12:38 GMT+02:00 Denis-Alexander Engemann <
denis.engemann at gmail.com>:

Hi Maria,

2014-12-21 10:18 GMT+01:00 Maria Hakonen <maria.hakonen at gmail.com>:

Hi all,

I would need to find the time intervals where there are
statistically significant differences between MEG responses measured under
three different conditions. I study the responses by comparing the mean
values in steps of 200 ms between the range of 400-2400 ms. I would like to
do this for responses from several brain areas. What could be the best way
to compare the mean values of the tree responses?

Single subject or group level?
For single subject a standard F-test would be appropriate. For
groups a oneway repeated measures ANOVA, if I understand your design
correctly (simply 3 different conditions).

I have planned to try f_twoway_rm in a loop. However, when rmANOVA
is used, sphericity test is needed, and if the assumption of sphericity is
violated, p values need to be corrected. Is there any function for this in
Python (e.g. Mauchly's sphericity test and Greenhouse-Geisser test)?

Note that this only needed if you have more than 2 factors with
more than two levels. Currently this is not implemented in our stats code.
The other questions is why you need a 2-way test for 3 conditions. I
probably did not fully understand your design.

Denis

Many thanks already in advance!

Regards,
Maria

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to
whom it is
addressed. If you believe this e-mail was sent to you in error and
the e-mail
contains patient information, please contact the Partners
Compliance HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent
to you in error
but does not contain patient information, please contact the
sender and properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to
whom it is
addressed. If you believe this e-mail was sent to you in error and
the e-mail
contains patient information, please contact the Partners
Compliance HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to
you in error
but does not contain patient information, please contact the sender
and properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to
whom it is
addressed. If you believe this e-mail was sent to you in error and
the e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to
you in error
but does not contain patient information, please contact the sender
and properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to
whom it is
addressed. If you believe this e-mail was sent to you in error and
the e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to
you in error
but does not contain patient information, please contact the sender
and properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to
whom it is
addressed. If you believe this e-mail was sent to you in error and
the e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to
you in error
but does not contain patient information, please contact the sender
and properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom
it is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to
you in error
but does not contain patient information, please contact the sender
and properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom
it is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to you
in error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom it
is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to you
in error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom it
is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to you in
error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20141221/7e9c18ab/attachment.html

Hi Denis,

I have used Newman-Keuls test in Statistica, but maybe paired t-test would
work as well if I correct the alpha.
Did you mean that I could simply use stats.ttest_rel and then correct the
values with, for example, fdr_correction?

-Maria

2014-12-21 17:49 GMT+02:00 Denis-Alexander Engemann <
denis.engemann at gmail.com>:

Hi Maria,

2014-12-21 16:35 GMT+01:00 Maria Hakonen <maria.hakonen at gmail.com>:

Hi Denis,

I tried that and got the following p values: 0.02993846, 0.47414992
The corresponding Greenhouse-Geisser corrected values computed with
Statistica were: 0.026775, 0.462423.
Huynh-Feldt correction gives 0.023894, 0.473539 and lower-bound
correction 0.036458, 0.427778

The uncorrected values calculated with Statistica and Python are equal
but also the corrected values are almost equal. So, maybe f_twoway_rm
works correctly now?

There might be some minor implementation-related difference, would be good
to investigate.
Generally the ANOVA function is tested against R and SPSS, event for the
correction:

https://github.com/mne-tools/mne-python/blob/master/mne/stats/tests/test_parametric.py#L10

I would therefore trust the results.

It would also be interesting to do post-hoc comparisons between
conditions but I think that Python doesn't have function for post-hoc test,
or at least I didn't found it?

What do you mean? You simply compute paired t-tests and correct the alpha.

-Denis

-Maria

2014-12-21 16:49 GMT+02:00 Denis-Alexander Engemann <
denis.engemann at gmail.com>:

Should be Greenhouse-Geisser,
also see source code:

https://github.com/mne-tools/mne-python/blob/master/mne/stats/parametric.py#L249

2014-12-21 15:47 GMT+01:00 Denis-Alexander Engemann <
denis.engemann at gmail.com>:

[f,p]=f_twoway_rm(data,factor_levels=[2,3], correction=True)

2014-12-21 15:45 GMT+01:00 Maria Hakonen <maria.hakonen at gmail.com>:

Hi Denis,

Are you sure that the sphericity correction is implemented by
f_twoway_rm?
I tested it with data where the assumption of sphericity is violated.
I calculated p values with Statistica and corrected them using the
lower-bound estimate, Greenhouse-Geisser correction and the Huynh-Feldt
correction. However, the p-values given by f_twoway_rm were equal with the
uncorrected values I calculated with Statistica. I used f_twoway_rm as:

[f,p]=f_twoway_rm(data,factor_levels=[2,3])

where data is hemisphere*sesion ANOVA table.

-Maria

2014-12-21 15:08 GMT+02:00 Denis-Alexander Engemann <
denis.engemann at gmail.com>:

2014-12-21 14:00 GMT+01:00 Maria Hakonen <maria.hakonen at gmail.com>:

Hi,

Is it that when I have hemisphere*session ANOVAs, I can use
f_twoway_rm, and this gives the corrected values?

with correction=True

Should one-way ANOVA be used in the cases where I am not interested
in hemisperic asymmetry? Is there any function for one way ANOVA that gives
sphericity corrected values?

A one-way ANOVA is currently not implemented. But you can just look
at the relevant main effect. Should be equivalent.

-Maria

2014-12-21 14:21 GMT+02:00 Denis A. Engemann <
denis.engemann at gmail.com>:

Hi Maria,

Hi Denis,

Should I use two-way ANOVA if I also want to compare hemispheres,
i.e. have a 2*3 (hemisphere*session) ANOVA table?

Sounds like the repeated measures anova is what you want to do here
indeed. I just realized the sphericity correction is actually implemented
by our code. So that should fly. Checkout the correction parameter.

I would need to do group level analysis.

-Maria

2014-12-21 12:38 GMT+02:00 Denis-Alexander Engemann <
denis.engemann at gmail.com>:

Hi Maria,

2014-12-21 10:18 GMT+01:00 Maria Hakonen <maria.hakonen at gmail.com>
:

Hi all,

I would need to find the time intervals where there are
statistically significant differences between MEG responses measured under
three different conditions. I study the responses by comparing the mean
values in steps of 200 ms between the range of 400-2400 ms. I would like to
do this for responses from several brain areas. What could be the best way
to compare the mean values of the tree responses?

Single subject or group level?
For single subject a standard F-test would be appropriate. For
groups a oneway repeated measures ANOVA, if I understand your design
correctly (simply 3 different conditions).

I have planned to try f_twoway_rm in a loop. However, when
rmANOVA is used, sphericity test is needed, and if the assumption of
sphericity is violated, p values need to be corrected. Is there any
function for this in Python (e.g. Mauchly's sphericity test and
Greenhouse-Geisser test)?

Note that this only needed if you have more than 2 factors with
more than two levels. Currently this is not implemented in our stats code.
The other questions is why you need a 2-way test for 3 conditions. I
probably did not fully understand your design.

Denis

Many thanks already in advance!

Regards,
Maria

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to
whom it is
addressed. If you believe this e-mail was sent to you in error
and the e-mail
contains patient information, please contact the Partners
Compliance HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent
to you in error
but does not contain patient information, please contact the
sender and properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to
whom it is
addressed. If you believe this e-mail was sent to you in error and
the e-mail
contains patient information, please contact the Partners
Compliance HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent
to you in error
but does not contain patient information, please contact the
sender and properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to
whom it is
addressed. If you believe this e-mail was sent to you in error and
the e-mail
contains patient information, please contact the Partners
Compliance HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to
you in error
but does not contain patient information, please contact the sender
and properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to
whom it is
addressed. If you believe this e-mail was sent to you in error and
the e-mail
contains patient information, please contact the Partners
Compliance HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to
you in error
but does not contain patient information, please contact the sender
and properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to
whom it is
addressed. If you believe this e-mail was sent to you in error and
the e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to
you in error
but does not contain patient information, please contact the sender
and properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to
whom it is
addressed. If you believe this e-mail was sent to you in error and
the e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to
you in error
but does not contain patient information, please contact the sender
and properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom
it is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to
you in error
but does not contain patient information, please contact the sender
and properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom
it is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to you
in error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom it
is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to you
in error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom it
is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to you in
error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20141221/4b5d6f5e/attachment.html

2014-12-21 17:26 GMT+01:00 Maria Hakonen <maria.hakonen at gmail.com>:

Hi Denis,

I have used Newman-Keuls test in Statistica, but maybe paired t-test would
work as well if I correct the alpha.
Did you mean that I could simply use stats.ttest_rel and then correct the
values with, for example, fdr_correction?

Yes, or just use our 1samp ttest after computing a paired contrast

-Maria

2014-12-21 17:49 GMT+02:00 Denis-Alexander Engemann <
denis.engemann at gmail.com>:

Hi Maria,

2014-12-21 16:35 GMT+01:00 Maria Hakonen <maria.hakonen at gmail.com>:

Hi Denis,

I tried that and got the following p values: 0.02993846, 0.47414992
The corresponding Greenhouse-Geisser corrected values computed with
Statistica were: 0.026775, 0.462423.
Huynh-Feldt correction gives 0.023894, 0.473539 and lower-bound
correction 0.036458, 0.427778

The uncorrected values calculated with Statistica and Python are equal
but also the corrected values are almost equal. So, maybe f_twoway_rm
works correctly now?

There might be some minor implementation-related difference, would be
good to investigate.
Generally the ANOVA function is tested against R and SPSS, event for the
correction:

https://github.com/mne-tools/mne-python/blob/master/mne/stats/tests/test_parametric.py#L10

I would therefore trust the results.

It would also be interesting to do post-hoc comparisons between
conditions but I think that Python doesn't have function for post-hoc test,
or at least I didn't found it?

What do you mean? You simply compute paired t-tests and correct the alpha.

-Denis

-Maria

2014-12-21 16:49 GMT+02:00 Denis-Alexander Engemann <
denis.engemann at gmail.com>:

Should be Greenhouse-Geisser,
also see source code:

https://github.com/mne-tools/mne-python/blob/master/mne/stats/parametric.py#L249

2014-12-21 15:47 GMT+01:00 Denis-Alexander Engemann <
denis.engemann at gmail.com>:

[f,p]=f_twoway_rm(data,factor_levels=[2,3], correction=True)

2014-12-21 15:45 GMT+01:00 Maria Hakonen <maria.hakonen at gmail.com>:

Hi Denis,

Are you sure that the sphericity correction is implemented by
f_twoway_rm?
I tested it with data where the assumption of sphericity is violated.
I calculated p values with Statistica and corrected them using the
lower-bound estimate, Greenhouse-Geisser correction and the Huynh-Feldt
correction. However, the p-values given by f_twoway_rm were equal with the
uncorrected values I calculated with Statistica. I used f_twoway_rm as:

[f,p]=f_twoway_rm(data,factor_levels=[2,3])

where data is hemisphere*sesion ANOVA table.

-Maria

2014-12-21 15:08 GMT+02:00 Denis-Alexander Engemann <
denis.engemann at gmail.com>:

2014-12-21 14:00 GMT+01:00 Maria Hakonen <maria.hakonen at gmail.com>:

Hi,

Is it that when I have hemisphere*session ANOVAs, I can use
f_twoway_rm, and this gives the corrected values?

with correction=True

Should one-way ANOVA be used in the cases where I am not interested
in hemisperic asymmetry? Is there any function for one way ANOVA that gives
sphericity corrected values?

A one-way ANOVA is currently not implemented. But you can just look
at the relevant main effect. Should be equivalent.

-Maria

2014-12-21 14:21 GMT+02:00 Denis A. Engemann <
denis.engemann at gmail.com>:

Hi Maria,

Hi Denis,

Should I use two-way ANOVA if I also want to compare hemispheres,
i.e. have a 2*3 (hemisphere*session) ANOVA table?

Sounds like the repeated measures anova is what you want to do
here indeed. I just realized the sphericity correction is actually
implemented by our code. So that should fly. Checkout the correction
parameter.

I would need to do group level analysis.

-Maria

2014-12-21 12:38 GMT+02:00 Denis-Alexander Engemann <
denis.engemann at gmail.com>:

Hi Maria,

2014-12-21 10:18 GMT+01:00 Maria Hakonen <maria.hakonen at gmail.com
>:

Hi all,

I would need to find the time intervals where there are
statistically significant differences between MEG responses measured under
three different conditions. I study the responses by comparing the mean
values in steps of 200 ms between the range of 400-2400 ms. I would like to
do this for responses from several brain areas. What could be the best way
to compare the mean values of the tree responses?

Single subject or group level?
For single subject a standard F-test would be appropriate. For
groups a oneway repeated measures ANOVA, if I understand your design
correctly (simply 3 different conditions).

I have planned to try f_twoway_rm in a loop. However, when
rmANOVA is used, sphericity test is needed, and if the assumption of
sphericity is violated, p values need to be corrected. Is there any
function for this in Python (e.g. Mauchly's sphericity test and
Greenhouse-Geisser test)?

Note that this only needed if you have more than 2 factors with
more than two levels. Currently this is not implemented in our stats code.
The other questions is why you need a 2-way test for 3 conditions. I
probably did not fully understand your design.

Denis

Many thanks already in advance!

Regards,
Maria

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person
to whom it is
addressed. If you believe this e-mail was sent to you in error
and the e-mail
contains patient information, please contact the Partners
Compliance HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent
to you in error
but does not contain patient information, please contact the
sender and properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to
whom it is
addressed. If you believe this e-mail was sent to you in error
and the e-mail
contains patient information, please contact the Partners
Compliance HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent
to you in error
but does not contain patient information, please contact the
sender and properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to
whom it is
addressed. If you believe this e-mail was sent to you in error and
the e-mail
contains patient information, please contact the Partners
Compliance HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent
to you in error
but does not contain patient information, please contact the
sender and properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to
whom it is
addressed. If you believe this e-mail was sent to you in error and
the e-mail
contains patient information, please contact the Partners
Compliance HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent
to you in error
but does not contain patient information, please contact the
sender and properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to
whom it is
addressed. If you believe this e-mail was sent to you in error and
the e-mail
contains patient information, please contact the Partners
Compliance HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to
you in error
but does not contain patient information, please contact the sender
and properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to
whom it is
addressed. If you believe this e-mail was sent to you in error and
the e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to
you in error
but does not contain patient information, please contact the sender
and properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to
whom it is
addressed. If you believe this e-mail was sent to you in error and
the e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to
you in error
but does not contain patient information, please contact the sender
and properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom
it is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to you
in error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom
it is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to you
in error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom it
is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to you
in error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom it
is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to you in
error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20141221/29d9b97c/attachment.html

Ok, many thanks for your help!

-Maria

2014-12-21 18:30 GMT+02:00 Denis-Alexander Engemann <
denis.engemann at gmail.com>:

2014-12-21 17:26 GMT+01:00 Maria Hakonen <maria.hakonen at gmail.com>:

Hi Denis,

I have used Newman-Keuls test in Statistica, but maybe paired t-test
would work as well if I correct the alpha.
Did you mean that I could simply use stats.ttest_rel and then correct the
values with, for example, fdr_correction?

Yes, or just use our 1samp ttest after computing a paired contrast

-Maria

2014-12-21 17:49 GMT+02:00 Denis-Alexander Engemann <
denis.engemann at gmail.com>:

Hi Maria,

2014-12-21 16:35 GMT+01:00 Maria Hakonen <maria.hakonen at gmail.com>:

Hi Denis,

I tried that and got the following p values: 0.02993846, 0.47414992
The corresponding Greenhouse-Geisser corrected values computed with
Statistica were: 0.026775, 0.462423.
Huynh-Feldt correction gives 0.023894, 0.473539 and lower-bound
correction 0.036458, 0.427778

The uncorrected values calculated with Statistica and Python are equal
but also the corrected values are almost equal. So, maybe f_twoway_rm
works correctly now?

There might be some minor implementation-related difference, would be
good to investigate.
Generally the ANOVA function is tested against R and SPSS, event for the
correction:

https://github.com/mne-tools/mne-python/blob/master/mne/stats/tests/test_parametric.py#L10

I would therefore trust the results.

It would also be interesting to do post-hoc comparisons between
conditions but I think that Python doesn't have function for post-hoc test,
or at least I didn't found it?

What do you mean? You simply compute paired t-tests and correct the
alpha.

-Denis

-Maria

2014-12-21 16:49 GMT+02:00 Denis-Alexander Engemann <
denis.engemann at gmail.com>:

Should be Greenhouse-Geisser,
also see source code:

https://github.com/mne-tools/mne-python/blob/master/mne/stats/parametric.py#L249

2014-12-21 15:47 GMT+01:00 Denis-Alexander Engemann <
denis.engemann at gmail.com>:

[f,p]=f_twoway_rm(data,factor_levels=[2,3], correction=True)

2014-12-21 15:45 GMT+01:00 Maria Hakonen <maria.hakonen at gmail.com>:

Hi Denis,

Are you sure that the sphericity correction is implemented by
f_twoway_rm?
I tested it with data where the assumption of sphericity is
violated. I calculated p values with Statistica and corrected them using
the lower-bound estimate, Greenhouse-Geisser correction and the Huynh-Feldt
correction. However, the p-values given by f_twoway_rm were equal with the
uncorrected values I calculated with Statistica. I used f_twoway_rm as:

[f,p]=f_twoway_rm(data,factor_levels=[2,3])

where data is hemisphere*sesion ANOVA table.

-Maria

2014-12-21 15:08 GMT+02:00 Denis-Alexander Engemann <
denis.engemann at gmail.com>:

2014-12-21 14:00 GMT+01:00 Maria Hakonen <maria.hakonen at gmail.com>:

Hi,

Is it that when I have hemisphere*session ANOVAs, I can use
f_twoway_rm, and this gives the corrected values?

with correction=True

Should one-way ANOVA be used in the cases where I am not
interested in hemisperic asymmetry? Is there any function for one way ANOVA
that gives sphericity corrected values?

A one-way ANOVA is currently not implemented. But you can just look
at the relevant main effect. Should be equivalent.

-Maria

2014-12-21 14:21 GMT+02:00 Denis A. Engemann <
denis.engemann at gmail.com>:

Hi Maria,

Hi Denis,

Should I use two-way ANOVA if I also want to compare hemispheres,
i.e. have a 2*3 (hemisphere*session) ANOVA table?

Sounds like the repeated measures anova is what you want to do
here indeed. I just realized the sphericity correction is actually
implemented by our code. So that should fly. Checkout the correction
parameter.

I would need to do group level analysis.

-Maria

2014-12-21 12:38 GMT+02:00 Denis-Alexander Engemann <
denis.engemann at gmail.com>:

Hi Maria,

2014-12-21 10:18 GMT+01:00 Maria Hakonen <
maria.hakonen at gmail.com>:

Hi all,

I would need to find the time intervals where there are
statistically significant differences between MEG responses measured under
three different conditions. I study the responses by comparing the mean
values in steps of 200 ms between the range of 400-2400 ms. I would like to
do this for responses from several brain areas. What could be the best way
to compare the mean values of the tree responses?

Single subject or group level?
For single subject a standard F-test would be appropriate. For
groups a oneway repeated measures ANOVA, if I understand your design
correctly (simply 3 different conditions).

I have planned to try f_twoway_rm in a loop. However, when
rmANOVA is used, sphericity test is needed, and if the assumption of
sphericity is violated, p values need to be corrected. Is there any
function for this in Python (e.g. Mauchly's sphericity test and
Greenhouse-Geisser test)?

Note that this only needed if you have more than 2 factors with
more than two levels. Currently this is not implemented in our stats code.
The other questions is why you need a 2-way test for 3 conditions. I
probably did not fully understand your design.

Denis

Many thanks already in advance!

Regards,
Maria

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person
to whom it is
addressed. If you believe this e-mail was sent to you in error
and the e-mail
contains patient information, please contact the Partners
Compliance HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was
sent to you in error
but does not contain patient information, please contact the
sender and properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person
to whom it is
addressed. If you believe this e-mail was sent to you in error
and the e-mail
contains patient information, please contact the Partners
Compliance HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent
to you in error
but does not contain patient information, please contact the
sender and properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to
whom it is
addressed. If you believe this e-mail was sent to you in error
and the e-mail
contains patient information, please contact the Partners
Compliance HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent
to you in error
but does not contain patient information, please contact the
sender and properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to
whom it is
addressed. If you believe this e-mail was sent to you in error
and the e-mail
contains patient information, please contact the Partners
Compliance HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent
to you in error
but does not contain patient information, please contact the
sender and properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to
whom it is
addressed. If you believe this e-mail was sent to you in error and
the e-mail
contains patient information, please contact the Partners
Compliance HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent
to you in error
but does not contain patient information, please contact the
sender and properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to
whom it is
addressed. If you believe this e-mail was sent to you in error and
the e-mail
contains patient information, please contact the Partners
Compliance HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to
you in error
but does not contain patient information, please contact the sender
and properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to
whom it is
addressed. If you believe this e-mail was sent to you in error and
the e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to
you in error
but does not contain patient information, please contact the sender
and properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom
it is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to
you in error
but does not contain patient information, please contact the sender
and properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom
it is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to you
in error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom
it is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to you
in error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom it
is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to you
in error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom it
is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to you in
error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20141221/8605f6dc/attachment.html