【发布时间】:2017-02-03 10:11:51
【问题描述】:
我在 R 上运行一个 logistf 模型
fit<-logistf(data=data, Amylose_trans ~ Tissue + Species); summary(fit)
logistf(formula = Amylose_trans ~ Tissue + Species, data = data)
由 Penalized ML 拟合的模型 Profile Likelihood Profile Likelihood Profile Likelihood Profile Likelihood Profile Likelihood Profile Likelihood Profile Likelihood 的置信区间和 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 值的方法
有什么建议吗?
提前致谢
【问题讨论】:
-
嘿,我不确定你在说什么,我查了一下,这是我最开始看的地方!
-
好的,这比我最初想象的要难。在函数
logistf()的源码中找到了这部分:fit$prob[i] <- 1 - pchisq(2 * (fit.full$loglik - fit.i$loglik), 1)在命令行输入logistf回车查看函数的定义。
标签: r chi-squared logistf