View source: R/continue_funs.R
kmbayes_continue | R Documentation |
Use this when you've used MCMC sampling with the kmbayes
function, but you did not take enough samples and do not want to start over.
kmbayes_continue(fit, ...)
fit |
output from |
... |
arguments to |
Note this does not fully start from the prior values of the MCMC chains. The kmbayes
function does not allow full specification of the kernel function parameters, so this will restart the chain at the last values of all fixed effect parameters, and start the kernel r
parmeters at the arithmetic mean of all r
parameters from the last step in the previous chain.
a bkmrfit.continued
object, which inherits from bkmrfit
objects similar to kmbayes
output, and which can be used to make inference using functions from the bkmr
package.
kmbayes_parallel
set.seed(111) dat <- bkmr::SimData(n = 50, M = 4) y <- dat$y Z <- dat$Z X <- dat$X ## Not run: fitty1 = bkmr::kmbayes(y=y,Z=Z,X=X, est.h=TRUE, iter=100) # do some diagnostics here to see if 100 iterations (default) is enough # add 100 additional iterations (for illustration - still will not be enough) fitty2 = kmbayes_continue(fitty1, iter=100) cobj = as.mcmc(fitty2) varnames(cobj) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.