Sample from a posterior
Usage
# S3 method for class 'nsbi_posterior'
sample(x, size = 1000, n = size, obs = NULL, max_sampling_batches = 100L, seed = NULL, ...)Arguments
- x
An
nsbi_posteriorobject (namedxto satisfy thesample()generic).- size, n
Number of posterior draws (
nis an alias forsize).- obs
Observation to condition on (defaults to the posterior's
x_obs).- max_sampling_batches
Safety cap on rejection-sampling rounds for bounded priors. The first round draws
nrows; later rounds size the batch from the running acceptance rate (at most100 * nrows), so low acceptance still fillsndraws within a few rounds.- seed
Optional integer seed. The draws are reproducible for a given
seed, and the caller's own random stream is restored afterwards.- ...
Unused.
