Learn R Programming

Biograph (version 2.0.6)

TransitionAB: Occurrences of selected transition by age

Description

Determines for a given transition the number of transitions by age

Usage

TransitionAB(Bdata, transition,keep)

Arguments

Bdata
Biograph object
transition
Selected transition
keep
Logical variable indicating whether observations (subjects) with the selected transition missing should be kept (TRUE) or removed (FALSE). Default: keep=FALSE

Value

case
The transition
n
Number of subjects in the sample experiencing the selected transition (transition count).
id
Identification number of subjects that experienced the transition
pos
Position of the selected transition in the state sequence (path variable Bdata$path of the Biograph object). If transition = "*N" and N is the first state, then that state is skipped. If a subject experienced several of the selected transition, the first transition is considered.
date
For each subject experiencing the transition, date of transition
age
For each subject experiencing the transition, age at transition
year
For each subject experiencing the transition, year of transition (year is real variable, including fraction of year)
cohort
For each subject experiencing the transition, birth cohort

Examples

Run this code
# Example 1: Transition NJ in GLHS data set
  data (GLHS)
  z <- TransitionAB (GLHS,"NJ",keep=TRUE)

# Example 2: Transition HM in NLOG98 data set
  data (NLOG98)
  z <- TransitionAB (NLOG98,"HM")

# Example 3: Transition 'Leaving parental home", irrespective of destination state
  data (NLOG98)
  z <- TransitionAB (NLOG98,"H*")

# Example 4: First marriage, irrespective of origin state
  data (NLOG98)
  z <- TransitionAB (NLOG98,"*M")

Run the code above in your browser using DataLab