Description Usage Arguments Value Examples

View source: R/nonparam_rmst.R

Non-parametric RMST function that allows for the tau (follow-up time) to be arbitrarily large. Uno package restricts it to be min(last observed event in either arm). Provides estimate, SE, CI for each arm. Provides same for difference in arms (and also p-value).

1 | ```
nonparam_rmst(dat, tau, alpha = 0.05)
``` |

`dat` |
Data frame of time-to-event data which MUST have the columns 'time', 'arm', and 'status |

`tau` |
How long of a follow-up to consider, i.e. we integrate the survival functions from 0 to tau |

`alpha` |
Confidence interval is given for (alpha/2, 1-alpha/2) percentiles |

A list including data.frame of results in each arm (RMST, RMTL, SE, pvalue, CI) as well as data.frame of results for Arm1 - Arm0 RMST.

1 2 3 4 5 | ```
time <- rnorm(100)
status <- rbinom(n=100, size=1, prob=0.5)
arm <- c( rep(1, 50), rep(0, 50))
dat <- data.frame(time=time, status=status, arm=arm)
nonparam_rmst(dat=dat, tau=1, alpha=0.05)
``` |

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.