【发布时间】:2019-02-27 17:35:48
【问题描述】:
在使用 carret 的 mdrr 数据研究逻辑回归的过程中,问题出现了。 我使用总共 19 个变量创建了一个完整模型,但我对分类变量的符号有疑问。
在我的回归模型中,分类变量是:
nDB:0 或 1 或 2
nR05 : 0 或 1
nR10 : 1 或 2
我使用glm创建了一个完整的模型,但我不知道为什么分类变量的名称有一个类别中的数字。
---------------------------------------------- --------------------------------
glm(formula = mdrrClass ~ ., family = binomial, data = train)
#Coefficients:
#(Intercept) nDB1 nDB2 nX nR051 nR101 nBnz2
#5.792e+00 5.287e-01 -3.103e-01 -2.532e-01 -9.291e-02 9.259e-01 -2.108e+00
#SPI BLI PW4 PJI2 Lop BIC2 VRA1
#3.222e-05 -1.201e+01 -3.754e+01 -5.467e-01 1.010e+00 -5.712e+00 -2.424e-04
# PCR H3D FDI PJI3 DISPm DISPe G.N..N.
# -6.397e-02 -4.360e-04 3.458e+01 -6.579e+00 -5.690e-02 2.056e-01 -7.610e-03
#Degrees of Freedom: 263 Total (i.e. Null); 243 Residual
#Null Deviance: 359.3
#Residual Deviance: 232.6 AIC: 274.6
---------------------------------------------- --------------------------------
以上结果表明nDB是有编号的,nR05和nR10与类别相关。 我想知道为什么上面附有数字。
【问题讨论】:
标签: r statistics regression logistic-regression