Description Usage Arguments Value Examples

View source: R/confint_km_diff.R

Function fitting Kaplan-Meier curves *S_1*, *S_2* to two groups and yielding
lower and upper (1-*α*)-confidence bounds for the difference *S_1-S_2* of these
two curves at a specific time point by using Greenwood's formula.

1 | ```
confint_km_diff(alpha, t0, data_r, data_t, plot = TRUE)
``` |

`alpha` |
confidence level |

`t0` |
time point of interest |

`data_r, data_t` |
datasets containing time and status for each individual |

`plot` |
if TRUE, a plot of the two Kaplan Meier curves will be given |

A list containing the difference *S_1(t_0)-S_2(t_0)* and the lower and upper (1-*α*)-confidence bounds. Further a plot of the curves is given.

1 2 3 4 5 6 | ```
data(veteran)
veteran_r <- veteran[veteran$trt==1,]
veteran_t <- veteran[veteran$trt==2,]
alpha<-0.05
t0<-80
confint_km_diff(alpha=alpha,t0=t0,data_r=veteran_r,data_t=veteran_t)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.