est_hazard_params: Estimation of hazard functional forms for background...

View source: R/background_mortality.R

est_hazard_paramsR Documentation

Estimation of hazard functional forms for background mortality

Description

est_hazard_params estimates the parameters of different continuous-time hazard functional forms for background mortality for a cohort with initial age n_age_init in a trial with duration of trial_time years.

Usage

est_hazard_params(n_age_init = 50, trial_time = 5,
  hazard = c("exponential", "linear", "geometric"), mortality = NULL)

Arguments

n_age_init

Initial age of the cohort

trial_time

Duration of clinical trial in years

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 data.frame with two columns. The first column should have age in yearly increments and the second column should have the mortality rate corresponding to the age. If NULL, the function will use all_cause_mortality.

Value

A vector with an age-independent mortality rate coefficient, mu0 and an age-dependent mortality rate coefficient, alpha.

Examples

n_age_init <- 50   # Initial age of cohort in trial
trial_time <- 5    # Length of clinial trial in years
## Not run: 
   v_coef_hazard <- est_hazard_params(n_age_init = n_age_init, 
   trial_time = trial_time, 
   hazard = "exponential")
   v_coef_hazard

## End(Not run)

feralaes/dshr documentation built on Aug. 28, 2023, 2:17 p.m.