Tengo un modelo de regresión de Cox y quiero obtener el plot ajustado por una covariable (sexo) con la función ‘ggadjustedcurves’, pero me da el siguiente error:
> cox2 <- coxph(os ~ imc_25 + sexo.1, data = datos) > cox2 Call: coxph(formula = os ~ imc_25 + sexo.1, data = datos) coef exp(coef) se(coef) z p imc_25 -0.621 0.537 0.299 -2.08 0.038 sexo.1M 0.714 2.042 0.387 1.84 0.065 Likelihood ratio test=6.23 on 2 df, p=0.0444 n= 76, number of events= 54 > ggadjustedcurves(cox2, variable = datos$sexo.1, data = datos) Error in `[.data.frame`(data, , variable) : undefined columns selected Agradezco cualquier feedback. Saludos, Patricio Patricio Suárez Gil Unidad de Investigación Área V-Gijón Planta 5ª Impar Hospital Universitario de Cabueñes C/Prado, 395 33394 Gijón (Asturias) Tfno: 985 185 000 (Ext. 85715) @uinvest_psg unidadinvestigacion.ar...@sespa.es ESPAÑA [[alternative HTML version deleted]] _______________________________________________ R-help-es mailing list R-help-es@r-project.org https://stat.ethz.ch/mailman/listinfo/r-help-es