calibrate.rjmcmc {geiger} | R Documentation |
initialize proposal width
Description
estimating a reasonable proposal width to initiate sampling for Markov sampling
Usage
calibrate.rjmcmc(phy, dat, nstep = 10000, widths = 2^(-3:3), type=c("bm",
"rbm", "jump-bm", "jump-rbm"), ...)
Arguments
phy |
a phylogenetic tree of class 'phylo' |
dat |
a named vector of continuous trait values, associated with each species in |
nstep |
number of proposal steps over which to assess proposal widths |
widths |
if unspecified, a series of proposal widths from 1/8 to 8 will be considered |
type |
a model type available in |
... |
Details
This function may be useful for constraining subsequent runs after an adequate proposal width has been approximated. MCMC samples from this calibration are not stored and do not become available to the user. This function is solely used to give the user a sense of acceptance rates that can be expected for different proposal widths. The narrower the width, the more easily the chain can become stuck. With a wider width, the chain will more quickly explore a broader parameter space, yet acceptance rates may become unacceptably low.
Author(s)
JM Eastman
See Also
Examples
n=40
phy=rcoal(n=n)
dat=rTraitCont(phy=phy, model="BM", sigma=sqrt(0.1))
r=paste(sample(letters,9,replace=TRUE),collapse="")
## calibrate proposal width
calibrate.rjmcmc(phy=phy, dat=dat, nstep=500, widths=2^(-3:0), type="rbm")