Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I perform an n way ANOVA in python?

I'd like to perform N-way ANOVA (specifically 4-way) in python, but most of what I see focuses on one or two way ANOVA. I know nothing about R so I'd prefer to not have to migrate there.

like image 801
Braaedy Avatar asked Dec 01 '17 20:12

Braaedy


People also ask

What is n way ANOVA?

A N-way (or factorial) analysis of variance, can examine data that are classified on multiple independent variables. For example, a two-way ANOVA (two factor ANOVA) can measure both the difference among treatments and among gender of participants simultaneously.

What is N in two-way ANOVA?

Two-Way ANOVA Table. It is assumed that main effect A has a levels (and A = a-1 df), main effect B has b levels (and B = b-1 df), n is the sample size of each treatment, and N = abn is the total sample size.


1 Answers

One good way is to use statsmodel anova. With this software you can specify models in more or less the conventional way using the patsy language, and results are presented as you would expect.

like image 150
Bill Bell Avatar answered Oct 11 '22 18:10

Bill Bell