r_event_counting {ARPobservation} | R Documentation |
Random generation of behavior streams (based on an alternating renewal process) of a specified length and with specified mean event durations, mean interim times, event distribution, and interim distribution, summarized as the the total number of behaviors that began during the recording session
r_event_counting(
n,
mu,
lambda,
stream_length,
F_event,
F_interim,
equilibrium = TRUE,
p0 = 0,
tuning = 2
)
n |
number of behavior streams to generate |
mu |
mean event duration |
lambda |
mean interim time |
stream_length |
length of behavior stream |
F_event |
distribution of event durations. Must be of class |
F_interim |
distribution of interim times. Must be of class |
equilibrium |
logical; if |
p0 |
Initial state probability. Only used if |
tuning |
controls the size of the chunk of random event durations and interim times. Adjusting this may be useful in order to speed computation time . |
Generates behavior streams by repeatedly drawing random event durations and random interim times from the distributions as specified, until the sum of the durations and interim times exceeds the requested stream length. Then applies an event counting filter to the generated behavior streams.
A vector of behavior counts of length n
.
Daniel Swan <dswan@utexas.edu>
r_event_counting(n = 5, mu = 2, lambda = 4, stream_length = 20,
F_event = F_exp(), F_interim = F_exp())