title: Kaplan Meier with R
body: <p>Im a newbie with R, so i have some Problems with the confidence intervals. Here ist my code:</p>
  
  <pre><code>    library(survival)
      zeiten &lt;- c(7, 3, 24, 19, 8, 7, 11, 19)
      delta &lt;- c(1, 1, 1, 1, 1, 1, 0, 0)
      survivalobjekt &lt;- Surv(zeiten, delta)
      km1 &lt;- survfit(survivalobjekt ~ 1)
      plot(x=km1, col=c("black", "red", "red"), xlab="x", ylab="S(x)", lty=1)
  </code></pre>
  
  <p>so now we check the summary of km1:</p>
  
  <pre><code>    Call: survfit(formula = survivalobjekt ~ 1)
  
      time n.risk n.event survival std.err lower 95% CI upper 95% CI
      3      8       1    0.875   0.117        0.673        1.000
      7      7       2    0.625   0.171        0.365        1.000
      8      5       1    0.500   0.177        0.250        1.000
     19      3       1    0.333   0.180        0.116        0.961
     24      1       1    0.000     NaN           NA           NA
  </code></pre>
  
  <p>The problems are these NA at the end. when i use plot(km1), I get 
  <img src="https://i.stack.imgur.com/fI1pm.png" alt="1">, 
  but i want to get 
  <img src="https://i.stack.imgur.com/GCIEw.jpg" alt="2"> 
  How can i get it? How can i remove those NA´s? </p>