Skip to content

Latest commit

 

History

History
executable file
·
50 lines (33 loc) · 1.4 KB

readme.md

File metadata and controls

executable file
·
50 lines (33 loc) · 1.4 KB

Overview

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.

Getting Started

  1. Install the release version of devtoolsand rootSolve from CRAN with

     install.packages(c("devtools","rootSolve"))
    
  2. 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")
  3. View the Introduction to the LifeTable package vignette:

    library(LifeTable)
    vignette("ComposingLifeTables")