如何重命名ggcoef_model中的标签?

问题描述 投票:0回答:0

我正在尝试在

ggcoef_model
函数的逻辑回归图中重命名变量的系数。例如,在变量“ID_GRADE”中,我想将“ID_GRADE[T.2]”重命名为“2do grado”。我能做什么?

Call:
glm(formula = IMPL_RESP_NEG_2b ~ ID_GRADO + IMPL_TIEMPO.OBS_2 + 
    IMPL_EDUC_MODELA_2_cat, family = "binomial", data = BASE_IX)

Deviance Residuals: 
    Min       1Q   Median       3Q      Max  
-2.2761  -1.1628   0.6914   0.8977   1.4785  

Coefficients:
                            Estimate Std. Error z value Pr(>|z|)    
(Intercept)                  0.77867    0.63869   1.219 0.222780    
ID_GRADO[T.2]               -0.30623    0.33122  -0.925 0.355194    
ID_GRADO[T.3]               -1.12641    0.32051  -3.514 0.000441 ***
IMPL_TIEMPO.OBS_2            0.03769    0.01137   3.314 0.000920 ***
IMPL_EDUC_MODELA_2_cat[T.1] -1.09070    0.47608  -2.291 0.021963 * 

这是ggcoef_model中的脚本:

ggcoef_model(LOGIMPL_NEC_GRUP_1aRegMultin.Mod,
             variable_labels = c(
               IMPL_TIEMPO.OBS_2 = "Tiempo de observación",
               IMPL_EDUC_MODELA_2_cat = "Modelado de las habilidades",
               ID_GRADO = "Grado escolar",
               IMPL_RESP_NEG_2b = "Presencia de respuestas negativas"),
             exponentiate = TRUE) 

enter image description here

label logistic-regression forestplot ggally
© www.soinside.com 2019 - 2024. All rights reserved.