使用python/scipy/statsmodel执行协方差分析

Yux*_*ang 3 scipy statsmodels

有谁可以帮助提供一个示例,展示如何使用python在scipy/statsmodel中完成ANCOVA(协方差分析)?

我不确定我是否要求太多,但快速搜索显示我对我来说不够丰富.

谢谢!

Jos*_*sef 6

Statsmodels使用线性模型OLS来估计ANOVA.因此,如ANCOVA中那样具有额外的连续回归量不会改变分析.

以下是相关文档的一些链接

Anova辅助函数和ANCOVA交互的示例 http://statsmodels.sourceforge.net/devel/examples/generated/example_interactions.html

使用公式创建设计矩阵 http://statsmodels.sourceforge.net/devel/example_formulas.html

核心OLS模型 http://statsmodels.sourceforge.net/devel/generated/statsmodels.regression.linear_model.OLS.html