Cox hazard regression for categorical variables when only with few events to get hazard ratio for each class in R

200 Views Asked by At

I try to find the hazard ratio for each class (total of 5 classes in this categorical variable I called "group"), and I also tried dichotomies but the results were still not good. Here only 8 events out of 97 subjects

My data got 97 ID(subjects), 97 rows, and these columns: ID, SEX, AGE, TIME, event, group(5 classes), group_A, grou_b, group_c, group_d, group_e, last 5 are binary.

I tried putting all seven variables in the model

# Fit the Cox proportional hazards model, group a as reference
model = coxph(Surv(time, event) ~  group_b + group_c + 
group_d + group_e, data = df, iter.max = 1000)

I also tried analyses by "group"

model_A = coxph(Surv(time, event) ~ group, data = df, iter.max = 1000)

both way shows Warning: coefficient may be infinite and not converge.

0

There are 0 best solutions below