ext_surv_sim | R Documentation |
Generally, the sampling is done is two steps
p(T) = p(T | interval i) p(interval i)
ext_surv_sim(t_info, S_info, T_max, n = 100)
t_info |
A vector of times for which expert opinion is elicited |
S_info |
A vector of mean survival probabilities estimated by experts
corresponding to time points in |
T_max |
The maximum survival time to be used |
n |
The number of patients to construct the artificial external data set; default 100 |
In particular
T ~ U(x_{i}, x_{i+1})
i ~ multinomial(\hat{\pi})
Dataframe of times and censoring status
dat <- ext_surv_sim(t_info = c(10,20,50),
S_info = c(0.9, 0.8, 0.2),
T_max = 100, n = 100)
if (require(survival)) {
km_fit <- survfit(Surv(time, event) ~ 1, data = dat)
plot(km_fit)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.