Usage
LikDD(par,model=-1,x,Ndec=-1,minN=0,psi=0,sampling=1,root=0,ki=0,muset=0,vec=0)
Arguments
par
Parameters (lambda,mu,K) for which to calculate the likelihood: lambda is speciation rate, mu is extinction rate, and K is carrying capacity.
model
model = -1: speciation rate is lambda(N) = max(0,lambda(1-N/K)). model = 0: speciation rate is lambda(N) = lambda for N <= k,="" und="" lambda(n)="0" for="" n="">K.=>
x
Vector of speciation times and ancient lineage sampling times in the phylogeny. Time is measured increasing going into the past with the present being time 0. x can be obtained from a phylogenetic tree using getx(TREE).
Ndec
Help variable when optimizing.
minN
Help variable when optimizing.
psi
Rate for sampling lineages through time.
sampling
Probabiliy to sample a present day lineage.
root
If root = 1 then max(x) is the mrca (crown age), if root = 0 then max(x) is the age of a branch ancestral to the mrca (stem age).
ki
Help variable when optimizing.
muset
Help variable when optimizing.
vec
vec=0 returns likelihood of model parameters for a tree given 1 lineage at beginning. vec=1 returns vector of likelihoods given i lineages at beginning.