skygrowth.map: Maximum a posteriori estimate of effective size through time...

Description Usage Arguments Value Examples

View source: R/skygrowth.R

Description

Maximum a posteriori estimate of effective size through time with a non-parametric growth model

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
skygrowth.map(
  tre,
  tau0 = 10,
  tau_logprior = "exponential",
  res = 50,
  quiet = FALSE,
  maxiter = 20,
  abstol = 0.01,
  control = NULL,
  maxHeight = NULL,
  ...
)

Arguments

tre

A dated phylogeny in ape::phylo format (see documentation for ape) or a list of phylogenies or multi.phylo object

tau0

Initial guess of the precision parameter

tau_logprior

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

res

Number of time intervals (integer)

quiet

Provide verbose output?

maxiter

Maximum number of iterations

abstol

Criterion for convergence of likelihood

control

List of options passed to optim

maxHeight

The earliest time (furthest time in to the past) to estimate Ne. If not provided, will use the median of root heights for input trees

...

Not implemented

Value

A fitted model including effective size through time

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
require(skygrowth)
require(ape)
load( system.file( package='skygrowth', 'NY_flu.rda' , mustWork=TRUE) ) 
# NOTE branch lengths in weeks  / 13 years in all
fit <- skygrowth.map( NY_flu 
 , res = 24*13  # Ne changes every 2 weeks
 , tau0 = .1    # Smoothing parameter. If prior is not specified, 
                # this will also set the scale of the prior
)
plot( fit ) + scale_y_log10()

## End(Not run)

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