Statsmodels Anova for logistic regression

会有一股神秘感。 提交于 2020-07-20 07:47:28

问题


I found the statsmodels implementation of the anova testing for linear models to be very useful (http://www.statsmodels.org/dev/generated/statsmodels.stats.anova.anova_lm.html#statsmodels.stats.anova.anova_lm) but I was wondering, since it's not present in the library, how one could approach building the equivalent version for the logistic regression part.

formulas:

from statsmodels.formula.api import ols, logit
import statsmodels.api as sm

ols(formula_str, data=data_on_which_to_perform_analysis).fit()
logit(formula_str, data=data_on_which_to_perform_analysis).fit()

sm.stats.anova_lm()

which means essentially (by looking at the source code) replicating anova_single. has anyone already done this meaybe in some remote repository? I ask because the imlementation goes very fast and very deep into the statsmodels core library so it's not so easy to work around it (at least with my current level of skill)

any advice on how to proceed?

来源:https://stackoverflow.com/questions/49819504/statsmodels-anova-for-logistic-regression

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!