是否可以在 python 中创建 coefplot 图?
我有一个来自以下代码的回归模型(而数据是我的数据框):
import statsmodels.formula.api as sm
df = pd.DataFrame({"A": data['percentWatched'], "B": data['agreement'], "C": data['credibility'], "D": data['trust'], "E": data['age'], "F": data['partIdeology7'], "G": data['vidLength'], "H": data['gender'], "I": data['agreeable'], "J": data['openness']})
result = sm.ols(formula="A ~ B + C + D + E + F + G + H + I + J", data=df).fit()
print(result.params)
print(result.summary())
我很想在 coefplot 上绘制结果,类似于这样:
这在python中可能吗?