calculate_life_expectancy: calculate_life_expectancy This function calculates life...

Description Usage Arguments Value

View source: R/calculate_life_expectancy.r

Description

calculate_life_expectancy This function calculates life expectancy table based on inputs

Usage

1
2
3
4
5
6
7
8
9
calculate_life_expectancy(
  age,
  a,
  b,
  vector_of_coefficients,
  log_hazard_ratio,
  data_for_weights,
  working_directory
)

Arguments

age

age

a

- intercept of Gompertz baseline hazards

b

- slope of Gompertz baseline hazards

vector_of_coefficients

- vector of coefficients from cox-model

log_hazard_ratio

- log hazard rations from cox-model

data_for_weights

- weights, i.e proportions for each generated combination

working_directory

- the working directory for any data that is produced from the functions to be saved in a folder

Value

data frame with life expectancies for given data frame of clients calculate_life_expectancy()


ilyasstatistics/mylongevity documentation built on Aug. 28, 2021, 4:51 p.m.