Skip to contents

This function internally uses abc::postpr for computing posterior probabilities of models, Bayes factors, etc., in order to aid in the selection of the most likely model.

Usage

select_model(models, tol, ...)

Arguments

models

A list of objects of the class demografr_sims_abc or demografr_abc.abc which store simulated summary statistics needed for calling abc::postpr

tol

Tolerance argument required by abc::postpr

...

Other optional arguments to be passed to abc::postpr

Value

Object of the class postpr and demografr_postpr

Examples

if (FALSE) { # \dontrun{
# read a list of three different ABC models
models <- lapply(c("X", "Y", "Z"), function(i) { readRDS(url(paste0(
"raw.githubusercontent.com/bodkan/demografr/refs/heads/main/inst/examples/downstream_abc",
i, ".rds"
))) })

modsel <- select_model(models, tol = 0.03, method = "neuralnet")
modsel
} # }