neuralsbi turns base::sample() into an S3 generic so that
sample(posterior, n) reads the way statisticians expect. For
any object without a dedicated method (vectors, etc.) this falls back to
base::sample() unchanged.
Arguments
- x
Object to sample from.
- ...
Passed on to methods /
base::sample().
Value
Whatever the dispatched method returns. The default method returns
the result of base::sample(); sample.nsbi_posterior() returns an
n x dim matrix of posterior draws.
