
Draw from one marginal by inverting its CDF between the bounds
Source:R/prior_families.R
marginal_sample.RdInverse-CDF sampling covers the truncated and untruncated cases with the same line, and it is exact: no rejection loop that stalls when the bounds cut into a tail.
Arguments
- m
A marginal from
new_marginal().- n
Number of draws.