Skip to contents

Primary event censored distribution functions

Functions for generating, evaluating density, and computing cumulative probabilities of primary event censored distributions

dprimarycensored() dpcens()
Compute the primary event censored PMF for delays
pprimarycensored() ppcens()
Compute the primary event censored CDF for delays
rprimarycensored() rpcens()
Generate random samples from a primary event censored distribution

Primary event distributions

Probability density and random generation functions for primary event distributions

dexpgrowth() pexpgrowth() rexpgrowth()
Exponential growth distribution functions

Primary censored distribution class and methods

S3 class and methods for computing primary event censored distributions, focusing on the internal machinery used by the package. Unlike the primary event distributions section which deals with specific distribution functions, this section covers the general framework for handling censored distributions.

new_pcens()
S3 class for primary event censored distribution computation
pcens_cdf()
Compute primary event censored CDF
pcens_cdf(<default>)
Default method for computing primary event censored CDF
pcens_cdf(<pcens_pgamma_dunif>)
Method for Gamma delay with uniform primary
pcens_cdf(<pcens_plnorm_dunif>)
Method for Log-Normal delay with uniform primary
pcens_cdf(<pcens_pweibull_dunif>)
Method for Weibull delay with uniform primary

Distribution checking functions

Functions to validate cumulative distribution functions (CDFs) and probability density functions (PDFs)

check_dprimary()
Check if a function is a valid bounded probability density function (PDF)
check_pdist()
Check if a function is a valid cumulative distribution function (CDF)
check_truncation()
Check if truncation time is appropriate relative to the maximum delay

Tools for working with package Stan functions

Utility functions for interfacing with Stan models and extracting results

pcd_load_stan_functions()
Load Stan functions as a string
pcd_stan_files()
Get Stan files containing specified functions
pcd_stan_functions()
Get Stan function names from Stan files
pcd_stan_path()
Get the path to the Stan code

Wrappers facilitating the use of other modelling packages

Functions that wrap around external packages like fitdistrplus to fit distributions to doubly censored data

fitdistdoublecens()
Fit a distribution to doubly censored data
pcd_as_stan_data()
Prepare data for primarycensored Stan model
pcd_cmdstan_model()
Create a CmdStanModel with primarycensored Stan functions