sample_until: Sample Event Times Until a Maximum Time

sample_untilR Documentation

Sample Event Times Until a Maximum Time

Description

Sample Event Times Until a Maximum Time

Usage

sample_until(maxval, meantime, sampler, ..., oversample = 0.1, verbose = FALSE)

Arguments

maxval

a positive numeric: the maximum time to simulate until

meantime

a positive numeric: the mean time between events

sampler

a function: the sampling distribution for time between events

...

any parameter arguments to 'sampler'

Value

A numeric vector of event times: the cumulative sum of draws from 'sampler' until the last value exceeds 'maxval'. That sum is then trimmed to values '<= maxval'. The first value in the vector is always 0.

See Also

Other heterogeneity: het.hist(), het.population(), het.run(), sample_pair()


ICI3D/ici3d-pkg documentation built on July 2, 2023, 1:59 p.m.