View source: R/parallel_funs.R
kmbayes_parallel | R Documentation |
Fit parallel chains from the kmbayes
function.
These chains leverage parallel processing from the future
package, which
can speed fitting and enable diagnostics that rely on multiple Markov
chains from dispersed initial values.
kmbayes_parallel(nchains = 4, ...)
nchains |
number of parallel chains |
... |
arguments to kmbayes |
a "bkmrfit.list" object, which is just an R list object in which each entry is a "bkmrfit" object kmbayes
set.seed(111) dat <- bkmr::SimData(n = 50, M = 4) y <- dat$y Z <- dat$Z X <- dat$X set.seed(111) future::plan(strategy = future::multisession, workers=2) # only 50 iterations fit to save installation time fitkm.list <- kmbayes_parallel(nchains=2, y = y, Z = Z, X = X, iter = 50, verbose = FALSE, varsel = TRUE) closeAllConnections()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.