Learn R Programming

eam (version 1.0.1)

plot_posterior_parameters: Plot parameter posterior distributions

Description

Plotting posterior distributions (and optionally prior distributions) from ABC results.

Usage

plot_posterior_parameters(data, ...)

# S3 method for abc plot_posterior_parameters(data, abc_input = NULL, ...)

Value

Invisibly returns `NULL`. Called for its side effect of producing plots.

Arguments

data

An abc object containing posterior samples in adj.values or unadj.values.

...

Additional arguments:

n_rows

Integer; number of rows in the plot grid (default: 2)

n_cols

Integer; number of columns in the plot grid (default: 2)

interactive

Logical; whether to pause between pages and wait for input

abc_input

Optional abc_input object containing prior samples for comparison.

See Also

plot_posterior_parameters.abc

Examples

Run this code
# Load ABC output from saved file
abc_file <- system.file(
  "extdata", "rdm_minimal", "abc", "abc_rejection_model.rds",
  package = "eam"
)
abc_rejection_model <- readRDS(abc_file)

# Load ABC input for prior comparison
abc_input_file <- system.file(
  "extdata", "rdm_minimal", "abc", "abc_input.rds",
  package = "eam"
)
abc_input <- readRDS(abc_input_file)

# Plot posterior distributions with prior comparison
plot_posterior_parameters(abc_rejection_model, abc_input)

Run the code above in your browser using DataLab