问题
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