blk.concomitant | R Documentation |
Finds “events” (i.e. times) that are “concomitant” with (i.e. occur at
the same time as) some given state (or “exposure”) in a
block-format
data set.
blk.concomitant(time, id, begin.exposure, end.exposure, id2 = id)
time |
A vector of times at which to determine the state, in |
id,id2 |
A valid |
begin.exposure |
A vectors of times delineating when the exposure begins, in |
end.exposure |
Vectors of times delineating when the exposure ends, in |
Exposure is determined by start-time/end-time pairs. This function
determines whether the exposure is present or absent at specific times in a
block-format
data set.
Sometimes, the time intervals may overlap. The behaviour in that instance is to count the number of overlapping intevals. For instance,
Inteval 1: |-----------------| Inteval 2: |------------------| Time: ^ ^ ^ ^ ^ Value: 0 1 2 1 0
The end times may be missing, indicating open-ended intervals. If all end
times are missing, then the same result can be achieved with
blk.countPastEvents
.
An integer vector in block-format
with respect to id
.
The value indicates how many of the time intervals overlap with the corresponding time
.
Benjamin Rich <mail@benjaminrich.net>
block-format
blk.countPastEvents
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.