Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I perform a 2-way repeated measures anova using statsmodels?

I found this example, which explains how to perform a 2-way ANOVA. I was wondering how to do the same for a repeated-measures design.

I did see this question, but I cannot assume independence of my repeated measurements.

I'm using statsmodels version 0.5.0.dev-Unknown.

Ideally, I'd like to use statsmodels, but if there's a viable solution using another library, I'd be interested in hearing about it as well.

Thanks in advance!

like image 284
Louis Thibault Avatar asked Apr 03 '13 14:04

Louis Thibault


People also ask

What is two-way repeated measures ANOVA?

A two-way repeated measures ANOVA (also known as a two-factor repeated measures ANOVA, two-factor or two-way ANOVA with repeated measures, or within-within-subjects ANOVA) compares the mean differences between groups that have been split on two within-subjects factors (also known as independent variables).

What is an example of a repeated measures ANOVA?

For example, you could use a repeated measures ANOVA to understand whether there is a difference in cigarette consumption amongst heavy smokers after a hypnotherapy programme (e.g., with three time points: cigarette consumption immediately before, 1 month after, and 6 months after the hypnotherapy programme).

When should a repeated measures ANOVA be used?

Repeated measures ANOVA is used when you have the same measure that participants were rated on at more than two time points. With only two time points a paired t-test will be sufficient, but for more times a repeated measures ANOVA is required.


1 Answers

There is nothing built-in yet for repeated measures designs ANOVA, though I suspect it wouldn't be difficult to support. If you could provide or point me to an example and file an enhancement request we will look to support it.

like image 153
jseabold Avatar answered Sep 21 '22 08:09

jseabold