Skip to contents

This function simulates the probability mass function of a daily double-censored process. The process involves two distributions: a primary distribution which represents the censoring process for the primary event and another distribution (which is offset by the primary).

Usage

simulate_double_censored_pmf(
  max,
  fun_primary = stats::runif,
  primary_args = list(),
  fun_dist = stats::rlnorm,
  dist_args = list(...),
  n = 1e+06,
  ...
)

Arguments

max

Maximum value for the computed CDF. If not specified, the maximum value is the maximum simulated delay.

fun_primary

Primary distribution function (default is runif).

primary_args

List of additional arguments to be passed to the primary distribution function.

fun_dist

Distribution function to be added to the primary (default is rlnorm).

dist_args

List of additional arguments to be passed to the distribution function.

n

Number of simulations (default is 1e6).

...

Additional arguments to be passed to the distribution function. This is an alternative to dist_args.

Value

A numeric vector representing the PMF.

Examples

simulate_double_censored_pmf(10, meanlog = 0, sdlog = 1)
#> Warning: `simulate_double_censored_pmf()` was deprecated in epinowcast 0.5.0.
#> ! Users should instead use the primarycensored package for simulating double
#>   censored processes.
#>  See <https://github.com/epinowcast/primarycensored> for more information.
#>  [1] 0.237948 0.410015 0.168812 0.076308 0.039626 0.022648 0.013675 0.008818
#>  [9] 0.005896 0.004022 0.002810