The primary event censored CDF is computed by integrating the product of
the delay distribution function (CDF) and the primary event distribution
function (PDF) over the primary event window. The integration is adjusted
for truncation if specified.
The primary event censored CDF, \(F_{\text{cens}}(q)\), is given by:
$$
F_{\text{cens}}(q) = \int_{0}^{pwindow} F(q - p) \cdot f_{\text{primary}}(p)
\, dp
$$
where \(F\) is the CDF of the delay distribution,
\(f_{\text{primary}}\) is the PDF of the primary event times, and
\(pwindow\) is the primary event window.
If truncation is applied (finite D or L > 0), the CDF is normalized:
$$
F_{\text{cens,norm}}(q) = \frac{F_{\text{cens}}(q) - F_{\text{cens}}(L)}{
F_{\text{cens}}(D) - F_{\text{cens}}(L)}
$$
where \(F_{\text{cens,norm}}(q)\) is the normalized CDF. For values
\(q \leq L\), the function returns 0; for values \(q \geq D\), it
returns 1.
This function creates a primarycensored object using
new_pcens() and then computes the primary event
censored CDF using pcens_cdf(). This abstraction allows
for automatic use of analytical solutions when available, while
seamlessly falling back to numerical integration when necessary.
See methods(pcens_cdf) for which combinations have analytical
solutions implemented.