Skip to contents

Generally, the sampling is done is two steps $$ p(T) = p(T | interval i) p(interval i) $$

Usage

ext_surv_sim(t_info, S_info, T_max, n = 100)

Arguments

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_info

T_max

The maximum survival time to be used

n

The number of patients to construct the artificial external data set; default 70

Value

Dataframe of times and censoring status.

Details

In particular \(T ~ U(x_{i}, x_{i+1})\) \(i ~ multinomial(\hat{\pi})\)

Examples

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)
}
#> Loading required package: survival