Inverse Tranform Sampling
Generates sample numbers at random from any probability distribution given its cumulative distribution function. Pre-defined distribution functions such as pnorm are supported.
pnorm
See here
for the algorithm.
simulate_cdf(n, cdf, range = c(-1e+200, 1e+200), ...)
n
cdf
range
...
simulate_cdf(10, pnorm) simulate_cdf(10, pbeta, shape1 = 2, shape2 = 2)
Useful links