I have about 10 different models with different combination of features that I would like to test using survival analysis. I have tried the following but it doesn't work
model1 = A1+A2+A3
model2 = A1+A2+A3+A4+A5
model3 = A1+A3+A4+A6
models = c(model1,model2,model3)
model_list <- array(c(models))
for (i in model_list){
print(i)
mod <- survreg(Surv(data$Days),data$Status)~ i, dist="weibull", data=data)
print(AIC(mod))
}
I realised that it is giving a numeric value and not the list of parameters itself. How do I correct this?