tte: Calculating log-rank test p-value, median time from each arm, hazard ratio between two arms, number of subjects and events in time-to-event outcomes.
Description
Calculate log-rank test p-value, median time from each arm, HR between arms, number of subjects and events
Usage
tte(os, osc, grp, type, test = "Futility")
Value
If type='all', return a list that includes the log-rank p-value, median time from each arm, hazard ratio between arms,
and 95% confidence interval of hazard ratio, number of subjects and events; and events
If type='logrank', return a list that includes the log-rank p-value, number of subjects and events;
If type='hr', return a list that includes hazard ratio between arms, and 95% confidence interval of hazard ratio
Arguments
os
Time to event variable
osc
Time to event censoring variable
grp
Treatment assignment indicator with 1 denoting the treated group, and 0 denoting the placebo group.
type
either "all" or "logrank" or "hr"
test
a character denotes the test type, include "Superiority","Futility","Two-sided"