Tinkering with mx01s, mx01y, mx01etc parameters

5 views
Skip to first unread message

Ivan Magalhães

unread,
May 4, 2026, 1:21:03 PM (12 days ago) May 4
to BioGeoBEARS
Hello everyone, 

I contacted Nick off-list to ask about how the parameters controlling for sympatry (mx01y), subset sympatry (mx01s), vicariance (mx01v), etc., work.

Nick kindly provided a very detailed and helpful answer (thank you very much!!!!), and as this might be of interest to others, I am pasting the conversation below. 

Best regards, Ivan

*****

Dear Dr. Matzke

A few months ago, I posted a question in the BioGeoBEARS Google group about modifying DEC and DIVA-like to allow inheritance of wide sympatry (similar to BAYAREA-like, but also allowing vicariance). I am still confused about this, so I took the liberty of reaching out, and would appreciate any insight you could kindly provide. Please feel free to answer it in the group so more people will benefit from it.

I modified the parameters table in both DEC and DIVA-like models by adding this bit of code:
BioGeoBEARSobject$BioGeoBEARS_object@params_table["mx01y","type"] = "fixed"
BioGeoBEARSobject$BioGeoBEARS_object@params_table["mx01y","init"] = 0.9999
BioGeoBEARSobject$BioGeoBEARS_object@params_table["mx01y","est"] = 0.9999

This results in models that do allow BOTH wide sympatry and vicariance (so they do the trick I wanted), but I am afraid this might be too simplistic. Is setting "mx01y","init"] to 0.9999 giving too much weight to wide sympatry? (e.g., by underweighting vicariance events?)

I wonder if I should set it to  "mx01y","init"] to 0.5 in the case of DEC, and to 0.3333 in the case od DIVA, to be more equitable with other possible events? Or how should I calculate this?

Thank you very much for any help.
Best,
Ivan

*****

Hi! The "mx01" parameters decide how much relative weight to give to the daughters of different range sizes.

0.0001 means "put all the weight on daughters of size 1" (this applies to the daughter that is non-identical to the ancestor at speciation)

0.9999 means "put all the weight on the biggest possible daughter (typically the size of the ancestor at speciation)

0.5000 means equal weight for all daughter range-sizes

So it's doing relative weighting *within* a particular speciation-event-class (mx01y for sympatry, mx01v for vicariance, mx01s for subset, mx01j for jump dispersal).

It's a weird system, but was an attempt to parameterize this thorny issue!

Cheers,
Nick

*****

Hi Nick,

Thanks a lot for this answer, this is very helpful.

So, just to check if I understand correctly:

     -  if  mx01y  is 0.9999, it forces all sympatric events to be  exact range-copying, by making both daughters the same size of the ancestor: ABCD->ABCD, ABCD, or BC->BC,BC, or A->A,A (as in BAYAREA) (and if I understand correctly, vicariance and subset sympatry are still possible if I set v, s, mx01v and mx01s correctly, right?)

     - if  mx01y is 0.0001, in sympatric events, this would always force one of the daughters to consist of a single range. Thus it would allow range copying in a single-area range (A->A,A), but not in a wide range (AB->AB,AB). (I see that mx01y is set to 0.0001 in DEC and DIVA-like).

I still do not understand what happens if you set  mx01y to be 0.5 --  how is it fundamentally different from 0.999? I suppose it allows wide range copying, but will this cause the model to prefer estimates that favor smaller-range copying (A->A,A) over those with "wide" range copying (AB->AB,AB)?

Thanks and best,
Ivan

*****

Hi!

The mx01y and mx01s actually work the same way, you can see the behavior here.

In the outputs, the Left is the ancestral range size (1-6 areas), the Right is the relative weight given to the various possible daughter range sizes (1-6 areas), on one side of a split.
mx01s = 0.0001
mx01v = 0.0001
mx01j = 0.0001
mx01y = 0.0001

maxent01s = relative_probabilities_of_subsets(max_numareas=6, maxent_constraint_01=mx01s, NA_val=0)
maxent01v = relative_probabilities_of_vicariants(max_numareas=6, maxent_constraint_01v=mx01v, NA_val=0)
maxent01j = relative_probabilities_of_subsets(max_numareas=6, maxent_constraint_01=mx01j, NA_val=0)
maxent01y = relative_probabilities_of_subsets(max_numareas=6, maxent_constraint_01=mx01y, NA_val=0)
maxent01s
maxent01v
maxent01j
maxent01y

mx01s = 0.9999
mx01v = 0.5
mx01j = 0.0001
mx01y = 0.9999

maxent01s = relative_probabilities_of_subsets(max_numareas=6, maxent_constraint_01=mx01s, NA_val=0)
maxent01v = relative_probabilities_of_vicariants(max_numareas=6, maxent_constraint_01v=mx01v, NA_val=0)
maxent01j = relative_probabilities_of_subsets(max_numareas=6, maxent_constraint_01=mx01j, NA_val=0)
maxent01y = relative_probabilities_of_subsets(max_numareas=6, maxent_constraint_01=mx01y, NA_val=0)
maxent01s
maxent01v
maxent01j
maxent01y

mx01s = 0.5
maxent01s = relative_probabilities_of_subsets(max_numareas=6, maxent_constraint_01=mx01s, NA_val=0)
maxent01s

These weights are then applied to the list of possible events for each type-of-cladogenesis.  I.e. the computer internally lists all of the y events, then multiplies through these weights.  Ditto for subset, vicariance, jump.

Cheers,
Nick

*****

Hi Nick,

Thanks, this is much appreciated and extremely helpful. Please, a last conceptual question, and I will stop bothering you:

mx01y = 0.5 gives
> maxent01y [,1] [,2] [,3] [,4] [,5] [,6] [1,] 1.000 0.000 0.000 0.000 0.000 0.000 [2,] 0.500 0.500 0.000 0.000 0.000 0.000 [3,] 0.333 0.333 0.333 0.000 0.000 0.000 [4,] 0.250 0.250 0.250 0.250 0.000 0.000 [5,] 0.200 0.200 0.200 0.200 0.200 0.000 [6,] 0.167 0.167 0.167 0.167 0.167 0.167
This means that, at a sympatric event, a 2-area range has an equal 0.5 weight of having the smaller daughter with 1 or 2 ranges; if the smallest daughter has a 2-area range, this is exact range-copying. But if it has a 1-area range, this is exactly like the subset sympatry in DEC, right? (e.g., AB->AB,A). So we can actually allow subset sympatry by setting  mx01y = 0.5?

If my reasoning above is correct, similarly, a 3-area range assigns a 0.333 weight to exact range-copy (ABC->ABC,ABC), 0.333 to having a 1-area daughter (like the classical subset sympatry, e.g., ABC->ABC,A), and 0.333 to having a 2-area daughter (e.g., ABC-> ABC,AB)? If so, is this a case of "extended subset sympatry" that is not allowed by classical DEC?

Again, thank you so much for the detailed explanations. Do you mind if I post this conversation on the original question, so it is searchable for other members of the group?

Best,
Ivan 

*****

It's been many years, but from memory, I *think* what happens is:

- for a given set of proposed parameters in the BioGeoBEARS_model_object
- a cladogenesis weights matrix is set up
- this is a table of ancestor range, left descendant, right descendant, weight
- for a given mode of speciation (sympatry, subset, vicariance, jump), for each possible ancestral range, the list of possible descendant pairs is added to the table.  This is thus a big list of "possibly possible" events.
- then, the list of cladogenetic events is gone through, and each one is given a weight-multiplier (per individual event, not per class of event). The weights from mx01-type weightings may be combined with others (e.g. different values of j)
- events with 0 weight (or beneath some small cutoff) are removed from the table

- the per-event weights weights are converted to per-event probabilities by dividing: (weight of individual event / weight of all events descending from a particular ancestral range)

- this probabilities matrix is then used in the likelihood calculation downpass, when combining downpass likelihoods at nodes
-the whole matrix is recalculated if any parameters change, e.g. during a step of maximum likelihood search

Thus, for sympatry, it would initially add these events to the table:

A->A,A
AB->AB,AB
ABC->ABC, ABC

but at mx01y=0.0001, the latter two would get 0 weight and be removed

For subset, events like this would be added:

ABC->A,ABC
ABC->ABC,A
ABC->AB,ABC
ABC->ABC,AB

...but the latter two would be removed at mx01s=0.0001.  At mx01s=0.9999, the former two would be removed. At 0.5, they'd all get equal weight.

Cheers,
Nick

Reply all
Reply to author
Forward
0 new messages