The simulate
method for class ebnm
.
Extracts the posterior sampler from an object of class ebnm
and returns a specified number of samples.
# S3 method for ebnm
simulate(object, nsim = 1, seed = NULL, ...)
A matrix of posterior samples, with rows corresponding to distinct samples and columns corresponding to observations.
The fitted ebnm
object.
The number of posterior samples to return per observation.
Either NULL
or an integer that will be used in a call to
set.seed
before simulating. If set, the value is saved as the
"seed"
attribute of the returned value. The default, NULL
,
will not change the random generator state.
Additional arguments to be passed to the posterior sampler
function. Since ebnm_horseshoe
returns an MCMC sampler, it takes
parameter burn
, the number of burn-in samples to discard. At
present, no other samplers take any additional parameters.