skygrowth.mcmc: A gibbs-metropolis algorithm for sampling Ne(t) with a...

Description Usage Arguments Value

View source: R/skygrowth.R

Description

A gibbs-metropolis algorithm for sampling Ne(t) with a non-parametric growth model

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
skygrowth.mcmc(
  tre,
  mhsteps = 1e+05,
  tau0 = 10,
  tau_logprior = "exponential",
  res = 50,
  quiet = F,
  control = NULL,
  gamma = NA,
  logRmean = NULL,
  logRsd = 1,
  maxHeight = NULL
)

Arguments

tre

A dated phylogeny in ape::phylo format (see documentation for ape)

mhsteps

Number of mcmc steps

tau0

Initial guess of the precision parameter

tau_logprior

Prior for precision parameter (character string (gamma or exponential) or function)

res

Number of time points (integer)

quiet

Provide verbose output?

control

List of options passed to optim

gamma

Death rate. If provided will compute R

logRmean

Mean of R in log space. Determines a lognormal prior on R(t). If used, _gamma_ must be provided

logRsd

SD of R in log space. Determines a lognormal prior on R(t). If used, _gamma_ must be provided

maxHeight

If supplied, will only compute Ne(t) estimates this far back in time. Otherwise will compute to the root of the tree.

Value

A fitted model including effective size through time


mrc-ide/skygrowth documentation built on May 19, 2020, 5:10 p.m.