150 Exposure-Response Modeling: Methods and Practical Implementation
where h
0kk
′
(t) is the specific baseline risk for tr ansition between the two states.
Then, given function c(t), the transition time can be generated accordingly.
Other state depe ndent covariates can be added without additional difficulties.
One special issue is whether one should restart the clock for h
0kk
′
(t), i.e., use
h
0kk
′
(t −t
k
) where t
k
is the time of reaching state k. However, this is a model
sp ecification issue rather than a simulation issue, as the approaches stated
here c an cope with bo th situations.
The following algorithm generates recurrent events fro m a two-state (event
“on” and “off”) model for piecewise constant exposure within time intervals
t
j
, t
j+1
, j = 1, ...,