Learn R Programming

Biograph (version 1.0)

LexisOccExp: Display occurrence, exposures and transition rates in a Lexis diagram

Description

The Lexis diagram is an age-time framework. It shows data in on a given transition in two time dimensions, e.g. calendar date and age. The user selects the transition and determines the age and time interval.

Usage

LexisOccExp(survey, transition, nyear)

Arguments

survey
Data in Biograph format (Biograph object)
transition
The transition selected. A transition is identified by the state of origin and the state of destination.
nyear
The age and time interval, generally 5 years.

Value

  • survThe survival object. The survival object is used as a response variable in survival models (see the survival package in CRAN)
  • LcohThe Lexis object. The Lexis object is a key object in the Epi package.
  • neventsEvent counts: number of transitions by age, origin and destination
  • ndurExposure times: duration exposed to the risk of experiencing the selected transition.
  • ratesThe transition rates (occurrence-exposure rates). They are obtained by dividing the event counts by the exposure times.

Details

The data presentation in the Lexis diagram is particularly helpful to explain the concept of occurrence-exposure rate. The functions plots Lexis diagrams for event counts, exposures and transition rates. In addition, it produces an object with as components the event counts, exposures and rates. It also produces a survival object, which can be used for further survival analysis with the survival package, and a Lexis object, which can be used for further analysis with the Epi package.

References

Carstensen, B. (2007) Age-Period-Cohort models for the Lexis diagram. Statistics in Medicine, 26(15):3018-3045.

Carstensen, B. (2009) The Epi package. Available at http://cran.r-project.org/web/packages/Epi/Epi.pdf

Examples

Run this code
# The following example selects the "JN" transitions from the GLHS data and produces Lexis diagrams with age and time intervals of 5 years
  data (GLHS)
  w <- LexisOccExp (survey=GLHS,transition= "JN",nyear=5)

Run the code above in your browser using DataLab