dot-dpcens: Define a fitdistrplus compatible wrapper around...

.dpcensR Documentation

Define a fitdistrplus compatible wrapper around dprimarycensored

Description

Define a fitdistrplus compatible wrapper around dprimarycensored

Usage

.dpcens(x, params, pdist, dprimary, dprimary_args, ...)

Arguments

x

Vector of quantiles

params

A data frame with columns 'swindow', 'pwindow', and 'D' corresponding to the secondary window sizes, primary window sizes, and truncation times for each element in x.

pdist

Distribution function (CDF). The package can identify base R distributions for potential analytical solutions. For non-base R functions, users can apply add_name_attribute() to yield properly tagged functions if they wish to leverage the analytical solutions.

dprimary

Function to generate the probability density function (PDF) of primary event times. This function should take a value x and a pwindow parameter, and return a probability density. It should be normalized to integrate to 1 over [0, pwindow]. Defaults to a uniform distribution over [0, pwindow]. Users can provide custom functions or use helper functions like dexpgrowth for an exponential growth distribution. See pcd_primary_distributions() for examples. The package can identify base R distributions for potential analytical solutions. For non-base R functions, users can apply add_name_attribute() to yield properly tagged functions if they wish to leverage analytical solutions.

dprimary_args

List of additional arguments to be passed to dprimary. For example, when using dexpgrowth, you would pass list(min = 0, max = pwindow, r = 0.2) to set the minimum, maximum, and rate parameters

...

Additional arguments to be passed to the distribution function


primarycensored documentation built on June 9, 2025, 5:09 p.m.