dinterval gives the density and rinterval generates random deviates,
but these are unusual as the density is 1 if x indicates the interval in which t
falls and 0 otherwise and the deviates are simply the interval(s) in which t falls.
Arguments
x
vector of interval indices.
t
vector of values.
c
vector of one or more values delineating the intervals.
log
logical; if TRUE, probability density is returned on the log scale.
n
number of observations.
Author
Christopher Paciorek
Details
Used for working with censoring in BUGS code.
Taking c to define the endpoints of two or more intervals (with implicit endpoints of plus/minus infinity), x (or the return value of rinterval) gives the non-negative integer valued index of the interval in which t falls. See the NIMBLE manual for additional details.