Hi Roi,

you can fit the BBM model using the 'BBMV' package.
You will first need to create a likelihood function as follows:

BBM <- lnL_BBMV(tree,trait,Npts=100,bounds=c(min(trait),max(trait)),a=0,b=0,c=0)

And then you need to find the maximum of the likelihood function:

fit_BBM <- find.mle_FPK(model=BBM,safe=TRUE)

The fit of the model can then be compared to that of other models,
using the $lnL and $aic elements of the output of the fit.

The tutorial of the BBMV package should explain all details:
https://github.com/fcboucher/BBMV/blob/master/Tutorial-BBMV.md


The example above assumes that the bounds of the BBM process are the
minimum and maximum of the observed trait values at the tips of your
phylogeny. This seems to be the ML estimates of the bounds, but if you
really want to optimize the values of the bounds (which should end up being
the min/max of observed trait values), you could use functions of the BBM
repository <https://github.com/fcboucher/BBM>, which are a bit less
efficient in terms of computation time.

Good luck,

Florian





2018-04-20 2:13 GMT+02:00 Roi Holzman <holz...@post.tau.ac.il>:

> Hi r-sigs
> is there a function that assess the fit of a bounded brownian model,
> compared to other common models of trait evolution (BM, OU etc)?
> thanks!
> Roi
>
> _______________________________________________
> R-sig-phylo mailing list - R-sig-phylo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
> Searchable archive at http://www.mail-archive.com/r-
> sig-ph...@r-project.org/
>

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

Reply via email to