Skip to contents

Developer-facing function, used when creating your own ernest_lrps subclass.

When specifying your subclass, you must implement this method to define how your sampler generates new points that satisfy the likelihood constraint.

Usage

propose(x, original = NULL, criteria = NULL, ...)

# S3 method for class 'rwmh_cube'
propose(x, original = NULL, criteria = NULL, ...)

# S3 method for class 'unif_cube'
propose(x, original = NULL, criteria = NULL, ...)

Arguments

x

An ernest_lrps object.

original

(double vector or matrix, optional) Points in the prior space used to start the proposal process. If NULL, a new point is generated by sampling from the unconstrained unit cube (see unif_cube()).

criteria

(double vector) Log-likelihood values that proposed points must satisfy.

...

Additional arguments passed to subclass methods.

Value

A list with:

  • unit: Matrix of proposed points in the prior space.

  • log_lik: Numeric vector of log-likelihood values for the proposed points.

  • n_call: Number of calls made to unit_log_fn during the proposal.