dsilvestro / PyRate

PyRate is a program to estimate speciation, extinction, and preservation rates from fossil occurrence data using a Bayesian framework.
GNU Affero General Public License v3.0
76 stars 35 forks source link

Error plotting MBD results: numpy.exceptions.AxisError: axis 1 is out of bounds for array of dimension 0 #41

Closed LauravanHolstein closed 1 year ago

LauravanHolstein commented 1 year ago

Hi!

Final question for now (I hope!). I got the following error while trying to plot the results of a MBD analysis:

Screenshot 2023-07-24 at 13 57 22

I'm running PyRate on a Mac M1, and these are the data (although I got the same error with a different dataset, so unlikely this is the consequence of weird data input).

Also, just to check my sanity, in Tracer the Gl0_0 estimate refers to the correlation parameter for self diversity dependence of speciation (and Wl0_0 to the shrinkage factor for self diversity dependence of speciation, etc), right? With the ...0_1, ...0_2, etc, estimates referring to parameters for supplied predictors 1, 2, etc?

The reason I ask is that, when I ran MBD with a single predictor, the LTT output of the whole clade, I got very different correlation parameters for Gl0_0 and Gl0_1 (-8.31 and 1.62, respectively). I assumed that these would be the same or similar, as GI0_1 would essentially be self diversity dependence in this case, right? I must be understanding it wrong!

Many thanks, Laura

thauffe commented 1 year ago

Hi Laura,

This error caused by the latest numpy version has been already fixed a week ago. Please download the latest PyRate version.

Your understanding is correct: Self diversity dependence is always indicated by 0_0, i.e. Gl0_0, Wl0_0, Gm0_0, and Wm0_0. Gl0_1 can never be diversity dependence. How did you run the MBD analysis with the LTT as single predictor? The only possibility to do so is an empty folder for -var (i.e., without any text files in it). Then, correctly, you do not get any Gl0_1 because self diversity is the only predictor.

Best, Torsten

LauravanHolstein commented 1 year ago

Hi Torsten,

You're right - tried plotting today and all good. Thank you for this!

Right - my mistake, I put the whole clade's LTT text file as the single predictor in the predictor folder. Will repeat the analysis without it!

Many thanks as always, Laura