比较逻辑回归中组的系数

时间:2021-06-04 17:07:10

标签: python logistic-regression statsmodels anova coefficients

我的数据如下所示:

patent  combination  breakthrough  patent_citations  science_citations
1           a            1               12                 5
2           b            1               14                 4
3           c            0               50                 6
4           ab           0               11                 4
5           ac           0               2                  1
6           bc           1               3                  14

其中“组合”是分类的,“突破”是二元的,最后两个变量是连续的。

在 Python 中,比方说。我在 statsmodels 中使用逻辑回归得到以下输出:

                        coef   std_err     z      P>|z|  [0.025    0.975]
intercept              -3.15     0.605    -5.05   0.00  -4.2     -1.9
combination[b]          1.12     0.105    -6.05   0.00   1.2      1.9
combination[c]          1.14     0.205    -6.05   0.00   1.2      1.5
combination[ab]         2.51     0.305    -7.05   0.00   2.2      3.9
combination[ac]         3.51     0.505    -4.05   0.00   3.2      4.9
combination[bc]         3.81     0.705    -4.05   0.00   3.2      3.9
patent_citations        0.11     0.005     6.05   0.00   0.1      1.9
science_citations       0.05     0.004     3.05   0.00   0        0.9

其中“突破”是因变量,组合[a]是参考组。

在此回归之后,我想进行测试以检查组是否彼此不同。我不想运行方差分析和事后检验 (Tukey HSD),因为这些测试将通过忽略我的控制变量(即专利引用、科学引用)来比较平均差异。换句话说,我的目的是检查回归系数的斜率是否在统计上彼此不同。

0 个答案:

没有答案