Re: [R-sig-phylo] chronos ape substitution rate strict clock

2024-03-07 Thread Vincenzo Ellis
Dear Emmanuel, Thank you very much for the explanation and example! This works just as I expected. When I divide the divergence rate by 2 (i.e., .0221 / 2 = 0.01105) and use it as "mu", like you showed, I get a tree that has node dates pretty close to what I get when using BEAST with a strict

Re: [R-sig-phylo] chronos ape substitution rate strict clock

2024-03-07 Thread Emmanuel Paradis
What about this (after reading 'tree' using your code): n <- Ntip(tree) dates <- estimate.dates(tree, rep(0, n), .0221) plot(compute.brtime(tree, -dates[-(1:n)])) axisPhylo() ? E. - Le 6 Mar 24, à 2:50, Vincenzo Ellis vael...@udel.edu a écrit : > Dear Klaus, > > Thank you for your

Re: [R-sig-phylo] chronos ape substitution rate strict clock

2024-03-07 Thread Emmanuel Paradis
Hi Vincenzo, "node.dating" is a help topic that points to two functions which seem to do what you are looking for. As a simple example: R> n <- 3 R> tr <- rcoal(n) R> estimate.dates(tr, rep(0, n), .01) [1] 0.0 0.0 0.0 -144.32183 -43.67435 R> estimate.dates(tr, rep(0, n), .1)

Re: [R-sig-phylo] chronos ape substitution rate strict clock

2024-03-05 Thread Vincenzo Ellis
Dear Klaus, Thank you for your response. I was wondering if you could expand on how to do this with phangorn::pml_bb(). Here's a small tree I made in Raxml with the cytochrome b gene of a few species of birds: library(ape) tree <- read.tree(text =

Re: [R-sig-phylo] chronos ape substitution rate strict clock

2024-03-04 Thread Klaus Schliep
Dear Vincenzo, For ML estimates the edge length are the expected number of substitutions per site, which depends on the product of rate and time. So you need either a rate estimate or calibration points to estimate the time. If you divide the edge length by the rate the edges should be

Re: [R-sig-phylo] chronos ape substitution rate strict clock

2024-03-04 Thread Vincenzo Ellis
Dear Liam, Thank you for your answer. Yes, I have a hypothesized average clock rate and no explicit calibration points. If I use ape::chronos() with default values it gives me a depth of 1 at the root. So I suppose to rescale the branch lengths I just need to multiply all of the branch lengths

Re: [R-sig-phylo] chronos ape substitution rate strict clock

2024-03-04 Thread Liam J. Revell
Dear Vincenzo. If I understand your problem problem, you do not have any explicit calibration points -- but you have a hypothesized average clock rate? If so, then you can obtain an ultrametric tree from/ape::chronos/ for any value of the smoothing parameter (/lambda/) and then simply re-scale

Re: [R-sig-phylo] chronos ape substitution rate strict clock

2024-03-04 Thread Vincenzo Ellis
Dear Emmanuel, Thank you very much for your response. I cannot see how to provide the substitution rate to the phangorn::pml_bb() function, but I was looking at the ape::node.dating() function and it appears that I could provide the substitution rate to the "mu" argument and then set the

Re: [R-sig-phylo] chronos ape substitution rate strict clock

2024-03-02 Thread Emmanuel Paradis
Hi Vincenzo, There's no direct way to do this with ape::chronos(). You may have a look at the function phangorn::pml_bb() but I'm not sure it can estimate the dates if the rate is provided in a model object given as main argument(?) That said, I expect that estimating so many dates to be very