Skip to contents

Analytical solution for the type I Pareto distribution of extraDistr::ppareto(), with shape a and scale (minimum) b. The extraDistr package is needed to create the pcens object. The solution holds for every shape, including shapes at or below 1 where the mean is infinite. See vignette("analytic-solutions") for the derivation.

Usage

# S3 method for class 'pcens_ppareto_dunif'
pcens_cdf(object, q, pwindow, use_numeric = FALSE)

Arguments

object

A primarycensored object as created by new_pcens().

q

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.

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.

Value

Vector of computed primary event censored CDFs

Examples

pcens_obj <- new_pcens(
  pdist = extraDistr::ppareto,
  dprimary = dunif,
  primary_args = list(min = 0, max = 1),
  a = 2.5,
  b = 0.5
)
pcens_cdf(pcens_obj, q = c(1, 4, 8), pwindow = 1)
#> [1] 0.2845178 0.9920509 0.9988450