Skip to contents

Computes the primary event censored PMF for a pcens object as created by new_pcens(). Secondary event windows and truncation are handled as in dprimarycensored().

Usage

pcens_pmf(object, x, pwindow, swindow = 1, L = -Inf, D = Inf, log = FALSE, ...)

Arguments

object

A pcens object as created by new_pcens().

x

Vector of quantiles

pwindow

Primary event window. Use pwindow = 0 for an exactly observed primary event, in which case the delay CDF is used directly.

swindow

Secondary event window (default: 1). Use swindow = 0 for an exactly observed secondary event, in which case a density is returned rather than a probability (see Details).

L

Minimum delay (lower truncation point). Defaults to -Inf, meaning no left truncation. For any finite value of L the distribution is left-truncated at L.

D

Maximum delay (upper truncation point). If finite, the distribution is truncated at D. If set to Inf, no upper truncation is applied. Defaults to Inf.

log

Logical; if TRUE, probabilities p are given as log(p)

...

Additional arguments passed to methods.

Value

Vector of primary event censored PMFs, normalized over [L, D] if truncation is applied