View source: R/background_mortality.R
calc_avg_mort | R Documentation |
calc_avg_mort
calculates the average background mortality for a
cohort with initial age n_age_init
in a trial with duration of
trial_time
years for either empirical hazard (e.g.. from life tables)
or some continuous-time hazard functional forms.
calc_avg_mort(n_age_init = 50, trial_time = 5, mu0 = NULL,
alpha = NULL, hazard = c("empirical", "exponential", "linear",
"geometric"), mortality = NULL)
n_age_init |
initial age of the cohort in the trial |
trial_time |
length of the trial |
mu0 |
age-independent mortality rate coefficient |
alpha |
age-dependent mortality rate coefficient |
hazard |
The hazard function to be used for background mortality. Either empirical (e.g., from life tables) or a continuous-time functional form. |
mortality |
A |
The average background mortality
n_age_init <- 50 # Initial age of cohort in trial
trial_time <- 5 # Length of clinial trial in years
## Not run:
dshr_emp <- calc_avg_mort(n_age_init = n_age_init,
trial_time = trial_time,
hazard = "empirical")
dshr_emp
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.