The moment estimators are based on the assumption that the
underlying behavior stream follows an Alternating Poisson Process, in which both the
event durations and interim times are exponentially distributed.
The PIR
vector can be in any order corresponding to the factor or vector
phase
. The levels of phase
can be any two levels, such as "A" and "B",
"base" and "treat", or "0" and "1". If there are more than two levels in phase
this function will not work. A value for base_level
must be specified - if it is a
character string it is case sensitive.
intervals
, interval_length
, and rest_length
are all single values that
are assumed to be held constant across both samples and all observation sessions.
If vectors of values are provided for these variables, it is assumed that the first value
in each vector is constant across all observations.
interval_length
This is the total length of each individual interval.
Sometimes a portion of the interval is set aside for recording purposes, in which case
rest_length
should be set to the length of time devoted to recording.
The default assumption is that there is no recording time.
The length of time devoted to active observation is calculated as interval_length - rest_length
.
At the default setting of bootstraps = 2000
, PIR_MOM takes just under six seconds to run on an Intel Core i5-2410M processor.