For use in pb210_crs_monte_carlo(). In the future, other distributions may be considered; we approximate mean + standard error as a normal distribution because this is done in

pb210_sample_norm(x)

Arguments

x

A vector of values, possibly with errors::errors().

Value

A (errorless) vector of randomly sampled values if x has errors::errors(), otherwise x, unchanged.

References

Aquino-López, M.A., Blaauw, M., Christen, J.A., and Sanderson, N.K. 2018. Bayesian Analysis of ^210^Pb Dating. Journal of Agricultural, Biological and Environmental Statistics, 23: 317–333. https://doi.org/10.1007/s13253-018-0328-7.

Examples

pb210_sample_norm(set_errors(1:10, 1))
#> [1] 2.034683 3.025472 2.347415 3.611613 4.656589 6.141624 7.529878 8.168900 #> [9] 8.870927 9.796054
pb210_sample_norm(1:10)
#> [1] 1 2 3 4 5 6 7 8 9 10