Learn R Programming

FBMS (version 1.1)

gmjmcmc.parallel: Run multiple gmjmcmc (Genetically Modified MJMCMC) runs in parallel returning a list of all results.

Description

Run multiple gmjmcmc (Genetically Modified MJMCMC) runs in parallel returning a list of all results.

Usage

gmjmcmc.parallel(
  runs = 2,
  cores = getOption("mc.cores", 2L),
  merge.options = list(populations = "best", complex.measure = 2, tol = 1e-07),
  data,
  loglik.pi = gaussian.loglik,
  loglik.alpha = gaussian.loglik.alpha,
  transforms,
  ...
)

Value

Results from multiple gmjmcmc runs

Arguments

runs

The number of runs to run

cores

The number of cores to run on

merge.options

A list of options to pass to the merge_results() function run after the

data

A matrix containing the data to use in the algorithm, first column should be the dependent variable, and the rest of the columns should be the independent variables.

loglik.pi

The (log) density to explore

loglik.alpha

The likelihood function to use for alpha calculation

transforms

A Character vector including the names of the non-linear functions to be used by the modification and the projection operator.

...

Further parameters passed to mjmcmc.

Examples

Run this code
result <- gmjmcmc.parallel(
  runs = 1,
  cores = 1,
  list(populations = "best", complex.measure = 2, tol = 0.0000001),
  matrix(rnorm(600), 100),
  P = 2,
  gaussian.loglik,
  loglik.alpha = gaussian.loglik.alpha,
  c("p0", "exp_dbl")
)

summary(result)

plot(result)

Run the code above in your browser using DataLab