Draw a time to event from a list of parametric survival functions

draw_tte(
  n_chosen = 1,
  dist = "exp",
  coef1 = 1,
  coef2 = NULL,
  coef3 = NULL,
  hr = 1,
  seed = NULL
)

Arguments

n_chosen

The number of observations to be drawn

dist

The distribution; takes values 'lnorm','weibullPH','weibull','llogis','gompertz','gengamma','gamma','exp'

coef1

First coefficient of the distribution, defined as in the coef() output on a flexsurvreg object

coef2

Second coefficient of the distribution, defined as in the coef() output on a flexsurvreg object

coef3

Third coefficient of the distribution, defined as in the coef() output on a flexsurvreg object

hr

A hazard ratio

seed

An integer which will be used to set the seed for this draw.

Value

A vector of time to event estimates from the given parameters

Examples

draw_tte(n_chosen=1,dist='exp',coef1=1,hr=1)
#> [1] 0.1474441