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.
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.
bkmrfit.continued object, which inherits from
bkmrfit objects similar to
kmbayes output, and which can be used to make inference using functions from the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
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, tier=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.