skygrowth0: Compute skygrowth Ne(t) and R(t) estimates for a given list...

Description Usage Arguments Value Examples

View source: R/skygrowth0.R

Description

If tstart is provided than you can supply a list of ape::phylo trees instead of treedater trees

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
skygrowth0(
  tds,
  tstart = decimal_date(as.Date("2020-03-01")),
  tau0 = 1/365/36.5^2,
  res = NULL,
  numpb = 10,
  ncpu = 6,
  gamma1 = (-log(0.5)) * 365/6.5,
  ...
)

Arguments

tds

A list or multiPhylo, containing ape::phylo or treedater trees

tstart

A numeric time to consider as the beginning of the epidemic in region; for best results, select a time when exponential growth in region is well underway. Can be NULL in which case the sarscov2::timports function is used to guess an appropriate date

tau0

Precision parameter for skygrowth. Default value corresponds to 1 per cent change in growth per week

numpb

Number of parametric bootstrap to use if using timports

ncpu

Number CPUs to use

gamma1

Death/recovery rates used for translating growth rates into R(t)

...

Additional arguments passed to skygrowth (eg mhsteps)

see

skygrowth, if omitted will guess a good value

Value

A list with dataframes for Ne, growth, and R(t)

Examples

1
2
3
4
5
6
## Not run: 
library( ape ) ; library( sarscov2 )
tres = read.tree( 'startTrees.nwk' ) 
o = skygrowth0 ( tres, start = decimal_date( as.Date('2020-02-15') ) )

## End(Not run)

emvolz-phylodynamics/sarscov2Rutils documentation built on Nov. 17, 2020, 9:22 a.m.