190 likes | 284 Views
Continuous-time microsimulation in longitudinal analysis. Frans Willekens Netherlands Interdisciplinary Demographic Institute (NIDI). ESF-QMSS2 Summer School “Projection methods for ethnicity and immigration status”, Leeds, 2 – 9 July 2009.
E N D
Continuous-timemicrosimulationin longitudinal analysis Frans Willekens Netherlands Interdisciplinary Demographic Institute (NIDI) ESF-QMSS2 Summer School “Projection methods for ethnicity and immigration status”, Leeds, 2 – 9 July 2009
What is microsimulation?A sample of a virtual population • Real population vs virtual population • Virtual population is generated by a mathematical model • If model is realistic: virtual population ≈ real population • Population dynamics • Model describes dynamics of a virtual (model) population • Macrosimulation: dynamics at population level • Microsimulation: dynamics at individual level (attributes and events – transitions)
Discrete-event simulation • What is it?: “the operation of a system is represented as a chronological sequence of events. Each event occurs at an instant in time and marks a change of state in the system.” (Wikipedia) • Key concept: event queue: The set of pending events organized as a priority queue, sorted by event time.
Types of observation • Prospective observation of a real population: longitudinal observation • In discrete time: panel study • In continuous time: follow-up study (event recorded at time occurrence) • Random sample (survey vs census) • Cross-sectional • Longitudinal: individual life histories
Longitudinal datasequences of eventssequences of states(lifepaths, trajectories, pathways) • Transition data: transition models or multistate survival analysis or multistate event history analysis • Discrete time: • Transition probabilities • Probability models (e.g. logistic regression • Transition accounts • Continuous time • Transition rates • Rate models (e.g. exponential model; Gompertz model; Cox model) • Movement accounts • Sequence analysis: Abbott: represent trajectory as a character string and compare sequences
Why continuous time?When exact dates are important • Some events trigger other events. Dates are important to determine causal links. • Duration analysis: duration measured precisely or approximately • Birth intervals • Employment and unemployment spells • Poverty spells • Duration of recovery in studies of health intervention • To resolve problem of interval censoring • Time to the ‘event’ of interest is often not known exactly but is only known to have occurred within a defined interval.
What is continuous time? • Precise date (month, day, second) • Month is often adequate approximation => discrete time converges to continuous time • Transition models: dependent variable • Probability of event (in time interval): transition probabilities • Time to event (waiting time): transition rates
Time to event (waiting time) models in microsimulation • Examples of simulation models with events in continuous time (time to event) • Socsim (Berkeley) • Lifepaths (Statistics Canada) • Pensim ((US Dept. of Labor) “Choice of continuous time is desirable from a theoretical point of view.” (Zaidi and Rake, 2001)
Time to event (waiting time) models in microsimulation Time to event is generated by transition rate model • Exponential model: (piecewise) constant transition (hazard) rate • Gompertz model: transition rate changes exponentially with duration • Weibull model: power function of duration • Cox semiparametric model • Specialized models, e.g. Coale-McNeil model
Time to event is generated by transition rate modelHow? Inverse distribution function or Quantile function
Quantile functions • Exponential distribution (constant hazard rate) • Distribution function • Quantile function • Cox model • Distribution function • Quantile function Parameterize baseline hazard
Two- or three-stage method • Stage 1: draw a random number (probability) from a uniform distribution • Stage 2: determine the waiting time from the probability using the quantile function • Stage 3: • in case of multiple (competing) events: event with lowest waiting time wins • in case of competing risks (same event, multiple destinations): draw a random number from a uniform distribution
Illustration • If the transition rate is 0.2, what is the median waiting time to the event? The expected waiting time is
Multiple origins and multiple destinationsState probabilities
Lifepaths during 10-year periodSample of 1,000 subject; =0.2
Conclusion • Microsimulation in continuous time made simple by methods of survival analysis / event history analysis. • The main tool is the inverse distribution function or quantile function. • Duration and transition analysis in virtual populations not different from that in real populations