
Method for step CDF delay with general primary event distribution
Source:R/pcens_cdf.R
pcens_cdf.pcens_pdiscretestep.RdComputes the analytic primary event censored CDF for a piecewise-constant
(step) delay distribution and an arbitrary primary event distribution
whose CDF \(F_{primary}\) is available via object$pprimary.
Usage
# S3 method for class 'pcens_pdiscretestep'
pcens_cdf(object, q, pwindow, use_numeric = FALSE)Arguments
- object
A
primarycensoredobject as created bynew_pcens().- q
Vector of quantiles
- pwindow
Primary event window
- use_numeric
Logical, if TRUE forces use of numeric integration even for distributions with analytical solutions. This is primarily useful for testing purposes or for settings where the analytical solution breaks down.
Details
The observation CDF is
$$F_{obs}(q) = \int_0^{pwindow} F_{step}(q-p)\,dF_{primary}(p)$$
Because \(F_{step}\) is piecewise constant, the integral reduces to
$$F_{obs}(q) = \sum_k c_k \,[F_{primary}(p^{end}_k) -
F_{primary}(p^{start}_k)]$$
where \(c_k\) is the constant value of \(F_{step}\) on the
\(k\)-th sub-interval of the primary event window induced by the
step-function knots.
The partition is exact for any bin widths, so bins may be wider or
narrower than pwindow, and for boundaries that start below zero.
Falls back to pcens_cdf.default when use_numeric = TRUE
or when no primary CDF is available on the object.
See also
Low level primary event censored distribution objects and methods
new_pcens(),
pcens_cdf(),
pcens_cdf.default(),
pcens_cdf.pcens_pdiscretehazard(),
pcens_cdf.pcens_pgamma_dunif(),
pcens_cdf.pcens_pgengamma.orig_dunif(),
pcens_cdf.pcens_pgengamma_dunif(),
pcens_cdf.pcens_plnorm_dunif(),
pcens_cdf.pcens_pweibull_dunif(),
pcens_quantile(),
pcens_quantile.default()