sample_from_prior {isotracer}R Documentation

Sample from a prior object

Description

Sample from a prior object

Usage

sample_from_prior(x, n = 1)

Arguments

x

A prior object.

n

Integer, number of samples to draw.

Value

A numeric vector of length n.

Examples

sample_from_prior(constant_p(1))
sample_from_prior(constant_p(1), 10)
sample_from_prior(hcauchy_p(0.5), 1)
hist(sample_from_prior(hcauchy_p(0.5), 20))
hist(sample_from_prior(uniform_p(0, 3), 1000))
hist(sample_from_prior(scaled_beta_p(3, 7, 2), 1e4))


[Package isotracer version 1.1.6 Index]