0

我在 R 上运行一个logistf模型

fit<-logistf(data=data, Amylose_trans ~ Tissue + Species); summary(fit)
logistf(formula = Amylose_trans ~ Tissue + Species, data = data)

由惩罚性 ML 置信区间拟合的模型和由轮廓似然性拟合的 p 值 轮廓似然性轮廓似然性轮廓似然性轮廓似然性轮廓似然性轮廓似然性

                       coef se(coef) lower 0.95 upper 0.95       Chisq            p
(Intercept)      -2.9444390 1.529438  -7.803600 -0.8816003  9.89263874 1.659412e-03
TissueFresh_comb -0.8108826 2.128231  -6.917669  4.7311183  0.11508982 7.344222e-01
Tissueguts        6.7620487 2.026376   3.573546 12.5665756 29.41458648 5.843615e-08
TissueNodules    -1.0664308 2.053264  -6.764977  4.2922631  0.23665005 6.266362e-01
TissueOld_comb   -1.0664308 2.053264  -6.764977  4.2922631  0.23665005 6.266362e-01
SpeciesO.badius   0.2386536 1.461843  -5.491559  5.5635990  0.01074908 9.174251e-01
SpeciesO.sp.      0.2386536 1.461843  -5.491559  5.5635990  0.01074908 9.174251e-01

Likelihood ratio test=140.6088 on 6 df, p=0, n=144
Wald test = 31.04725 on 6 df, p = 2.482811e-05

协方差矩阵:

              [,1]      [,2]       [,3]       [,4]       [,5]          [,6]          [,7]
[1,]  2.339181e+00 -2.339181 -2.3391813 -2.3391813 -2.3391813  1.421471e-15  1.178081e-15
[2,] -2.339181e+00  4.529369  2.8174918  2.9407710  2.9407710 -1.080011e+00 -1.080011e+00
[3,] -2.339181e+00  2.817492  4.1061987  2.7118392  2.7118392 -6.690186e-01 -6.690186e-01
[4,] -2.339181e+00  2.940771  2.7118392  4.2158934  2.8078876 -8.414506e-01 -8.414506e-01
[5,] -2.339181e+00  2.940771  2.7118392  2.8078876  4.2158934 -8.414506e-01 -8.414506e-01
[6,]  1.421471e-15 -1.080011 -0.6690186 -0.8414506 -0.8414506  2.136985e+00  8.842641e-01
[7,]  1.178081e-15 -1.080011 -0.6690186 -0.8414506 -0.8414506  8.842641e-01  2.136985e+00

我一直在尝试提取 Chisq 值,但我不知道该怎么做!我可以轻松提取 coef、术语、p.values、上下 ci 等,但我无法找到提取 Chisq 值的方法

有什么建议么?

提前致谢

4

2 回答 2

0

以下应该可以解决问题:

qchisq(1-fit$prob,df=1)
于 2021-03-15T14:33:03.670 回答
-1

“drop1(fit)”这应该可以。

于 2020-12-17T22:55:38.130 回答