Skip to contents

Plot histogram of posterior distribution(s)

Usage

# S3 method for class 'demografr_abc.abc'
hist(x, param = NULL, ...)

Arguments

x

ABC object generated by run_abc

param

A character vector containing either parameter names to summarize, or a regex-like matches to be used for subsetting. If NULL (the default), all parameters will be extracted.

...

Formal ellipsis argument of the plot method (unused)

Value

A base R histogram plot

Examples

# read inferred posterior distribution object from an example ABC run
abc_res <- readRDS(system.file("examples/basics_abc.rds", package = "demografr"))

# plot histograms of posteriors for all parameters (in sequence)
# hist(abc_res)

# plot only selected posteriors
# hist(abc_res, param = "gf_BC")
hist(abc_res, param = "^Ne_")