Skip to contents

Sample from a posterior

Usage

# S3 method for class 'nsbi_posterior'
sample(x, size = 1000, n = size, obs = NULL, max_sampling_batches = 100L, ...)

Arguments

x

An nsbi_posterior object (named x to satisfy the sample() generic).

size, n

Number of posterior draws (n is an alias for size).

obs

Observation to condition on (defaults to the posterior's x_obs).

max_sampling_batches

Safety cap on rejection-sampling rounds for bounded priors.

...

Unused.

Value

An n x dim matrix of posterior draws (class nsbi_samples).