Geniefit: A function to fit coalescent models to a given phylogenetic...

Description Usage Arguments Value Author(s) Examples

Description

A function to fit coalescent models to a given phylogenetic tree.

Usage

1
2
Geniefit(phy, Model, start, upper, lower, Rcpp = F, MCMC = F, sig = 0.1,
  run = 10000)

Arguments

phy

A phylogenetic tree.

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).

start

Initial values for the parameters to be optimized over.

lower,

upper Bounds on the variables.

Rcpp

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

MCMC

MCMC simulation is run when it is true, and not run when it is False. The default prior is uniform given the lower and upper.

sig

MCMC simulation step size.

run

Number of MCMC simulation.

Value

Parameters estimation of a given model, loglikelihood and AIC

Author(s)

Fei Xiang (xf3087@gmail.com)

Examples

1
2
3
4
5
6
7
library(ape)
t1=rcoal(20)
Geniefit(t1,Model="expo",start=c(100,.1),upper=Inf,lower=0)
Geniefit(t1,Model="expo",start=c(100,.1),upper=Inf,lower=0,Rcpp=T)
###a MCMC simulation included##
f=Geniefit(t1,Model="expo",start=c(100,.1),upper=Inf,lower=0,MCMC=T,sig=.1,run=10000)
acf(f$MCMC.simulation)

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