Run the main geographic profiling MCMC. Model parameters are taken from the current active parameter set, and MCMC parameters are passed in as arguments. All output is stored within the project.

run_mcmc(
  project,
  K = 3,
  burnin = 100,
  samples = 1000,
  auto_converge = TRUE,
  converge_test = 100,
  coupling_on = FALSE,
  cluster = NULL,
  pb_markdown = FALSE,
  store_raw = TRUE,
  create_maps = TRUE,
  silent = !is.null(cluster),
  beta_manual = NULL,
  rung_store = NULL
)

Arguments

project

an rgeoprofile_project, as produced by the function rgeoprofile_project().

K

the number of sources.

burnin

the number of burn-in iterations.

samples

the number of sampling iterations.

auto_converge

whether convergence should be assessed automatically every converge_test iterations, leading to termination of the burn-in phase. If FALSE then the full burnin iterations are used.

converge_test

test for convergence every convergence_test iterations if auto_converge is being used.

coupling_on

whether to implement Metropolis coupling.

cluster

option to pass in a cluster environment (see package "parallel").

pb_markdown

whether to run progress bars in markdown mode, in which case they are updated once at the end to avoid large amounts of output.

store_raw

whether to store raw MCMC output in addition to summary output. Setting to FALSE can considerably reduce output size in memory.

create_maps

whether to create maps of posterior probability and geoprofile. Usually will want to create these maps, but the code runs much faster without this step, hence the option.

silent

whether to suppress all console output.

beta_manual

allows manual specification of thermodynamic powers used.

rung_store

Pick a rung whose output will be stored

Details

Both longitude and latitude values can be represented to a given precision level using the arguments precision_lon and precision_lat - for example, a precision of 0.01 means that values are rounded to the nearest hundredth of a degree. This allows the use of look-up tables for the likelihood calculation, which significantly speeds up the MCMC. Set to 0 to use exact values (up to C++ "double" precision) rather than using look-up tables.