kmbayes_continue {bkmrhat} | R Documentation |
Continue sampling from existing bkmr fit
Description
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.
Usage
kmbayes_continue(fit, ...)
Arguments
fit |
output from |
... |
arguments to |
Details
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.
Value
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.
See Also
Examples
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)
[Package bkmrhat version 1.1.3 Index]