Stop Error in stratified areas-adjacency analyses

30 views
Skip to first unread message

Ziv Lieberman

unread,
Jun 19, 2025, 9:53:07 PMJun 19
to BioGeoBEARS
Hi all,
I'm trying to run a time-stratified analysis using areas-adjacency matrices only for each time bin. I am running into "stop error #2" whenever I try to run DEC, with LnL=NaN.
The error prompts that the adjacency matrices may be overly stringent. However, I lack the prior information to confidently use another approach (e.g., manual dispersal multipliers or distance methods). I have also tried the recommendation of not using the adjacency file but instead manually specifying nonadjacent areas for each time bin.
Is there a way to get around this issue, or do I really have to scrap the areas-adjacency approach? As I say, I'm not sure I can justify an approach that uses more specific kinds of matrices.
Please see attached my data files as well as the error message.
Thank you for any insight you can provide!
-Ziv
P.S. for what it's worth (probably nothing)!, I am able to run DEC under a strictly Bayesian framework using these same data and adjacencies (in revbayes).
c-ir-comb-scaled.tre
timeperiods.txt
doli_bgb.Rmd
geog.data
biogeobears_error.txt
areas_adjacency.txt

Nick Matzke

unread,
Jun 19, 2025, 11:38:12 PMJun 19
to bioge...@googlegroups.com
Hi! -- adjacencies in RevBayes are probably used a bit differently?  I.e. "adjacency" can mean "I won't allow dispersal unless the areas are adjacent" or "I won't allow a range-state to exist in the model unless the areas are adjacent".  These are very different things.

The safest approach is to set up a manual states list, giving the exact list of ranges you want to allow in each time period.

(wikidot seems stressed, here is the archived link to that discussion)

Then use the manual_dispersal_multipliers to control which areas are allowed to have dispersal between them.

I will take a look at your files - that error is almost always someone making their data impossible, ie they have a tip range of ABC but their model disallows any transitions to get to ABC.

Cheers,
Nick



--
You received this message because you are subscribed to the Google Groups "BioGeoBEARS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to biogeobears...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/biogeobears/01ed9fa7-e1e8-4ec5-9c64-269b64d90898n%40googlegroups.com.

Ziv Lieberman

unread,
Jun 19, 2025, 11:54:49 PMJun 19
to BioGeoBEARS
Hi Nick,
Thanks for the rapid reply! I did also try the method at the link you provided - you will see it commented out in the .Rmd file - and got the same error. It is, of course, possible that I made a mistake in setting it up!
Cheers,
Ziv

Nick Matzke

unread,
Jun 20, 2025, 12:43:41 AMJun 20
to bioge...@googlegroups.com
Hi -- it looks to me like your area adjacency matrix excludes range AI, which is a range of the tip Ravavy_miafina_D0646.

When I added this, it worked...files attached... (note: this gives my manual ranges interpretation of your areas adjacency matrix).

Cheers,
Nick


timeperiods.txt
tree.newick
geog.data
Rscript_M3b_v1.R

Ziv Lieberman

unread,
Jun 20, 2025, 12:52:21 AMJun 20
to BioGeoBEARS
Ah-ha! That would do it ;) Thank you for the very careful check of the inputs and for the explanation. I'll go ahead and make sure this runs for me too.
Thank you again! This was extremely helpful.
Ziv
Reply all
Reply to author
Forward
0 new messages