I am trying to run a Cox proportional hazard model to determine the effects of covariates on the survival of neonates. Previously when I ran coxph with numeric Predictor Variables, I had a result.
# Create a survival object using age and event variables
surv_data <- Surv(research$Q220N, research$QEVENT)
# Fit the Cox proportional hazards regression model with a specified ties argument
cox_model <- coxph(surv_data ~ Q405 + Q414 + Q420 + Q426B + Q430 + Q433A, data = research, ties = "exact")
Warning message:
In coxph.fit(X, Y, istrat, offset, init, control, weights = weights, :
Ran out of iterations and did not converge
I tried fitting the model with one variable at a time. Just to identify the variable causing the error. I have 365 observation and initially I was considering 10 predictor variables. Can the sample size be the problem?