Description Usage Arguments Value Examples
Generate table from estimated survival probabilities by standard KM method for treatment, control and their difference. Require formattable
package to run.
1 | km.est.table(y,delta,treat,t)
|
y |
a numeric vector of observed time |
delta |
a factor vector of indicator for events |
treat |
a factor vector of indicator for treatment, 1 for treatment group, 0 for control group |
t |
a numeric vector of time points for estimation |
A table (formattable
object) containing the estimated S(t) with standard deviation at each time point.
1 2 3 4 5 6 7 | library(survival)
y <- as.matrix(gbsg$rfstime/(365.25/12))
treat <- data.matrix(gbsg$hormon)
delta <- as.matrix(gbsg$status)
t <- seq(0,80,2)
km.est.table(y=y,delta=delta,treat=treat,t=t)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.