Skip to contents

Shows the normalised likelihood, importance weights, and evidence as functions of log-volume.

Usage

# S3 method for class 'ernest_estimate'
plot(x, ...)

# S3 method for class 'ernest_run'
plot(x, ..., ndraws = 0)

Arguments

x

An ernest_estimate or ernest_run object.

...

These dots are for future extensions and must be empty.

ndraws

An optional positive integer. The number of log-volume sequences to simulate. If equal to zero, no simulations will be made, and a one draw vector of log-volumes are produced from the estimates contained in x. If NULL, getOption("posterior.rvar_ndraws") is used (default 4000).

Value

Invisibly returns x. A ggplot2::ggplot() object is printed as a side effect.

The plot is faceted into three panels. The horizontal axis shows log-volume: If x is an ernest_run, these estimates are derived from the run; if x is an ernest_estimate (or ndraws != 0), these values are simulated.

The three y axes are:

  • Evidence: Estimate with an error ribbon drawn from either the estimated standard error (if ernest_run) or from the median credible interval (MCI) (if ernest_estimate);

  • Normalised Likelihood: The likelihood value of the criteria used to draw new points from the likelihood-restricted prior sampler, normalised by the maximum likelihood generated during the run;

  • Posterior Weight: The density of the posterior weights attributed to regions of volume within the prior. For ernest_estimate objects, an error ribbon is drawn with the MCI of this estimate.

Note

For ernest_estimate, ndraws should be large enough to plot the

See also

  • calculate() for generating ernest_estimate objects.

  • visualize() for plotting the posterior distributions generated by a run.

Examples

# Plot integration results from a run.
data(example_run)
plot(example_run)


# Simulate results before plotting.
plot(example_run, ndraws = 50)
#> Warning: `ndraws` should be above 100 to accurately plot credible intervals.

# Simulate results from a run, then plot simulated results.
sim <- calculate(example_run, ndraws = 50)
plot(sim)
#> Warning: `ndraws` should be above 100 to accurately plot credible intervals.