make.gbm: tailor reversible-jump Markov chain Monte Carlo sampling

View source: R/utilities-misc.R

make.gbmR Documentation

tailor reversible-jump Markov chain Monte Carlo sampling

Description

controlling reversible-jump Markov chain Monte Carlo sampling

Usage

make.gbm(phy, dat, SE=NA, 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 phy

SE

a named vector of standard errors for each trait value; applied to all trait values if given a single value

type

the class of model to use (see rjmcmc.bm)

...

arguments passed internally to control other settings (see Details)

Details

The argument ... controls the substitution of default settings for Markov-chain Monte Carlo sampling. Below are the settings that are controllable by the user. These parameters and their default settings can also be found with an empty call to the function (e.g., make.gbm()).

measurement error (SE): one of the arguments necessary for running rjmcmc.bm is SE, which is a statement about the error associated with the values given in dat. Measurement error (whose argument is SE) can be a named vector of numeric values (including NA) or a single value (including NA). If given as a vector, SE must have names that correspond to the those found for dat. If given a single value for SE, the sampler will apply that value of measurement error to all tips in the tree. If NA appears for the measurement error for any species, SE becomes an additional parameter of the model: this density is consequently sampled by rjmcmc.bm. The default for rjmcmc.bm is to estimate a single SE (which is applied to all species).

control settings: default settings for each control parameter are given below. Note that for the discrete random variables (for which dlnSHIFT and dlnJUMP) apply, certain criteria must be met if the user prefers to supply a different prior density. The function dcount is useful for building a custom prior density function for discrete variables.

Value

The items that can be tailored in the resulting control object are as follows:

method

default direct; this defines the implementation for computing model likelihood (currently with only the default available)

constrainSHIFT

default FALSE; if integer given, this constrains the number of local clocks in the diffusive process

constrainJUMP

default FALSE; if integer given, this constrains the number of pulses in the jump process

dlnSHIFT

default dcount(0:(nn - 1), FUN = dpois, lambda = log(2)), where nn is the number of branches in the tree; this controls the prior density on the number of shifts between local clocks in the tree (and applies only if the type argument to rjmcmc.bm is "rbm" or "jump-rbm") and if constrainSHIFT is FALSE)

dlnJUMP

default dcount(0:nn, FUN = dlunif, min = 0, max = nn, dzero = 0.5), where nn is the number of branches in the tree; this controls the prior density on the number of evolutionary pulses across the tree (and applies only if the type argument to rjmcmc.bm is "jump-bm" or "jump-rbm" and if constrainJUMP is FALSE)

dlnRATE

default function (x) dexp(x, rate = 1/(10^3), log = TRUE); this defines the prior density on rate scalars

dlnSE

default function (x) dexp(x, rate = 1/(10^3), log = TRUE); this defines the prior density on measurement error

dlnPULS

default function (x) dexp(x, rate = 1/(10^3), log = TRUE); this defines the prior density on jump variance

dlnROOT

default function (x) dunif(x, min=-10^3, max=10^3, log=TRUE); this defines the prior density on root state

rate.lim

default list(min=0, max=Inf); this defines the numerical limits on the rate scalars

se.lim

default list(min=0, max=Inf); this defines the numerical limits on the measurement error

root.lim

default list(min=-Inf, max=Inf); this defines the numerical limits on the root state

jump.lim

default 1; determines the number of jumps permissible along each branch (1 is currently supported)

excludeSHIFT

default c(); if this argument is not empty, these are branches (specified by numeric node-identifiers) which cannot be chosen for a novel local clock

excludeJUMP

default c(); if this argument if not empty, these are branches (specified by numeric node-identifiers) which cannot be chosen for an evolutionary pulse

bm.jump

default 0.5; this defines the ratio between proposals for the diffusion and jump processes (0.5 is perfectly balanced)

mergesplit.shift

default 0.5; this defines the ratio between proposals that scale model complexity and those that do not

tune.scale

default 0.65; this defines the ratio between proposals that modify the model branchwise versus treewide

slide.mult

default 0.25; this defines the ratio between sliding window and multiplier proposals

prob.dimension

default 0.65; this defines the proportion of proposals used to modify model dimensionality

prob.effect

default 0.3; this defines the proportion of proposals that do not alter dimensionality

prob.SE

default 0.03; this defines the proportion of proposals that alter the (unknown) measurement error

prob.root

default 0.02; this defines the proportion of proposals that alter the root state

prop.width

default 1; this defines the proposal width used for multiplier and sliding-window proposals

simple.start

default TRUE; this determines whether to start the MCMC sampler with minimal dimensionality

filebase

default "result"; this defines a 'base' filename for the output

Author(s)

JM Eastman

See Also

rjmcmc.bm


geiger documentation built on April 4, 2023, 1:07 a.m.