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, ...)

Arguments

object

The fitted ebnm object.

nsim

The number of posterior samples to return per observation.

seed

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.

Value

A matrix of posterior samples, with rows corresponding to distinct samples and columns corresponding to observations.