title: Survival analysis using R
body: <p>On running a survival model using the survival package I encountered a strange error message which I am unable to understand.</p>
  
  <p>The error message was </p>
  
  <pre><code>Error in Surv(time, event) : Time and status are different lengths
  </code></pre>
  
  <p>The number of observations in each column used in <code>model1</code> is exactly the same.</p>
  
  <pre><code>&gt; mydata3&lt;-read.csv(file.choose())
  &gt; attach(mydata3)
  &gt; event&lt;-Event
  &gt; time&lt;-time
  &gt; x&lt;-cbind(WDCL,Age,SEX)
  &gt; ch&lt;-coxph(Surv(time,event)~x,method="breslow")
  </code></pre>
  
  <p>Thanks and Regards.</p>