View source: R/dshr_from_ohr.R
calc_ohr_from_dshr | R Documentation |
calc_ohr_from_dshr
calculates an oHR from a dsHR for a cohort with
initial age n_age_init
in a trial with duration of trial_time
years
with a disease-specific mortality rate, mu_Dis
, under a specific
continuous-time hazard function for background mortality.
calc_ohr_from_dshr(dshr = 0.5, mu_Dis = 0.05, n_age_init = 50,
trial_time = 5, mu0 = NULL, alpha = NULL, hazard = c("empirical",
"exponential", "linear", "geometric"), mortality = NULL)
dshr |
Disease-specific hazard ratio |
mu_Dis |
Disease-specific mortality rate |
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 overall hazard ratio (oHR)
This function requires the average background mortality of the cohort, which
is computed with the function calc_avg_mort
.
n_age_init <- 50 # Initial age of cohort in trial
trial_time <- 5 # Length of clinial trial in years
ohr <- 0.55 # Overall hazard ratio (oHR)
mu_Dis <- 0.05 # Disease-specific mortality rate
## Not run:
dshr_emp <- calc_dshr_from_ohr(ohr = ohr, mu_Dis = mu_Dis,
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.