A simple algorithm for producing a timeseries that drives a second timeseries (1 for event occurrence; 0 otherwise) using parameters, which change independent and conditional probability of an event to occur.
1  simts(BL1, BL2, BLR1, BLR2, BL2C1, tsL)

BL1 
Base event rate of the first timeseries 
BL2 
Base event rate of the second timeseries 
BLR1 
Rate of repetition in the first series 
BLR2 
Rate of repetition in the second series 
BL2C1 
Conditional probability of repetition. 
tsL 
Length of the simulated timeseries 
A matrix with tworows, where the first row is
the 'driving' timeseries and the second row
is the second timeseries. The columns are
the number of simulated points as selected
by the argument tsL
.
Rick Dale and Moreno I. Coco (moreno.cocoi@gmail.com)
1 2 3 4 5 6 
Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
All documentation is copyright its authors; we didn't write any of that.