title: How to loop over several models for survival analysis in R?
body: <p>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</p>
  
  <pre><code>model1 = A1+A2+A3
  model2 = A1+A2+A3+A4+A5
  model3 = A1+A3+A4+A6
  
  models = c(model1,model2,model3)
  model_list &lt;- array(c(models))
  
  for (i in model_list){
    print(i)
    mod &lt;- survreg(Surv(data$Days),data$Status)~ i, dist="weibull", data=data)
    print(AIC(mod))
  }
  </code></pre>
  
  <p>I realised that it is giving a numeric value and not the list of parameters itself. How do I correct this? </p>