问题描述
预先感谢您提供任何答案.我想在 python 中进行 2 路重复测量方差分析,其中一个 IV 有 5 个级别,其他 4 个级别,一个 DV.我试过在 scipy 文档和一些在线博客中四处寻找,但似乎找不到任何东西.
Thanks in advance for any answers. I want to conduct a 2-way repeated measures ANOVA in python where one IV has 5 levels and the other 4 levels, with one DV. I've tried looking around in scipy documentation and a few online blogs but can't seem to find anything.
推荐答案
这是一个老问题,但我会提供答案.
this is an old question but I will provide an answer.
你可以看看pyvttbl.使用这个库(可以通过 Pip 安装),您可以对独立和重复测量(和混合设计)进行 n 向方差分析.请注意,您似乎必须使用 Pyvttbl 自己的数据框方法来处理您的数据.
You could take a look at pyvttbl. Using this library (can be installed via Pip) you can carry out n-way ANOVA for both independent and repeated measures (and mixed designs). Note that it seems like that you will have to use Pyvttbl own data frame method to handle your data.
很简单:
dataframe.anova('dv', sub='id', wfactors=['iv1', 'iv2'])
您可以查看我的博客文章,了解有关如何执行 重复测量的二元方差分析.
You can see my blog post for a more elaborated example on how to carry out a 2-way ANOVA for repeated measures.
这篇关于双向重复测量方差分析python函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!