loglik: A function to calculate the log likelihood of a phylogenetic...

Description Usage Arguments Value Author(s) Examples

View source: R/loglik.R

Description

A function to calculate the log likelihood of a phylogenetic tree given various coalescent models.

Usage

1
loglik(phy, parr, Model, Rcpp = F)

Arguments

phy

A phylogenetic tree.

parr

Parameters.

Model

A Model choice from const (constant population size), expo (exponetial growth),expan (expansion growth), log (logistic growth), step (piecewise constant), pexpan (piecewise expansion growth) and plog (piecewise logistic growth).

Rcpp

Calculation is based on C++ code when it is True and on R code when it is False.

Value

log likelihood of a phylogeny given a coalescent model and parameters.

Author(s)

Fei Xiang (xf3087@gmail.com)

Examples

1
2
3
data(village)
system.time(loglik(village,c(100,1),Model="expo",Rcpp=T))
system.time(loglik(village,c(100,1),Model="expo",Rcpp=F))

xiangfstats/GenieR documentation built on May 4, 2019, 1:06 p.m.