The LifeTable package integrates cross sectional event incidence data including:
- disease diagnoses and competing risks, such as:
- total deaths or deaths from other causes
- risk altering behaviors
together with estimates of hazard ratios for risk altering behaviors obtained from longitudinal studies analyzed with the Cox PH model in order to generate accurate estimates on the efficacy of risk modifying interventions on incidence, survival, and (age conditional) life expectancy.
-
Install the release version of
devtools
androotSolve
from CRAN withinstall.packages(c("devtools","rootSolve"))
-
To install mfactor from github use: .
devtools::install_github("jdthorpe/LifeTable")
note that in windows, you may have to build the github tools using:
library(devtools) build_github_devtools() #### Restart R before continuing ####
-
Alternatively, download the github repository to a zip file and use:
install.packages("LifeTable.zip", repos = NULL) # Remove the package after installation unlink("LifeTable.zip")
-
-
View the Introduction to the LifeTable package vignette:
library(LifeTable) vignette("ComposingLifeTables")