gmjmcmc.parallel {FBMS}R Documentation

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,
  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,
  ...
)

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, second should be the intercept 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 params passed to mjmcmc.

Value

Results from multiple gmjmcmc runs

Examples

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)



[Package FBMS version 1.0 Index]