Learn R Programming

Biograph (version 2.0.6)

state_age: Determines for given individuals state occupied at given ages

Description

Determines state occupied at given exact ages (birthdays). The function is used in the Occup function

Usage

state_age (Bdata,age,ID)

Arguments

Bdata
Biograph object
age
Vector of ages for which state occupancy should be determined
ID
Vector of IDs of individuals for whom state occupancy should be determined

Value

nam
Names of states that can be occupied. The list includes '-' to indicate that at that age observation did not start yet and '+' to indicate that observation ended.
state
State occupied at given age by each individual in the study.
state.n
State occupied at given age: all individuals (table).

See Also

Occup

Examples

Run this code
  data(GLHS)
  param <- Parameters(GLHS)
  agetrans <- AgeTrans(Bdata=GLHS)
  z <- state_age (Bdata=GLHS,age=c(20,30),ID=c(15,208))
  

Run the code above in your browser using DataLab