blk.concomitant: Find Concomitant Events

Description Usage Arguments Details Value Author(s) See Also

Description

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.

Usage

1
blk.concomitant(time, id, begin.exposure, end.exposure, id2 = id)

Arguments

time

A vector of times at which to determine the state, in block-format with respect to id.

id,id2

A valid block-format ID.

begin.exposure

A vectors of times delineating when the exposure begins, in block-format with respect to id2.

end.exposure

Vectors of times delineating when the exposure ends, in block-format with respect to id2.

Details

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,

1
2
3
4
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.

Value

An integer vector in block-format with respect to id. The value indicates how many of the time intervals overlap with the corresponding time.

Author(s)

Ben Rich <benjamin.rich@certara.com>

See Also


benjaminrich/PCSmisc documentation built on May 24, 2019, 5:02 a.m.