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).