How does matpopmod compare to other libraries
I have identified the following libraries / software that have a somewhat similar scope as MPM:
- ULM
- popbio (R)
- popdemo (R)
- Rage (R, very recent)
It would be nice to have an objective comparison of those libraries to include in the FAQ.
ULM
ULM is in a category of its own. It is actually the closest to matpopmod in terms of scope, and it has both advantages and disadvantages over matpopmod.
Matpopmod has the advantage of enabling the user to write scripts (technically, that can be done with ULM's CLI, but I doubt someone will do that nowadays; using Python clearly is easier) and is thus probably better for iterating over a large number of matrices (e.g, COMPADRE). The COMPADRE interface is a huge advantage of matpopmod. I think it is fair to say that matpopmod is a bit more complete when it comes to "standard" matrix population models, and also that it is better documented (although that's still work in progress!).
It also seems to me that some points in the implementation are more rigorous (in the sense that we make sure that things are well-defined before returning them). For instance, ULM will happily talk about the stable distribution of a periodic model (when referring to the Perron vector) and it could be argued that it sometimes returns descriptors that are not well-defined (at least in the conventional sense).
Finally, that is highly subjective but I would say that matpopmod is maybe a bit more intuitive to use (the ULM language has a bit of a learning curve).
ULM makes it possible to study more general models, in particular stochastic ones. It gives the user a lot of liberty about the population model (although less than an individual based Python simulation).
R libraries
I have scrolled through the three them, and so far it looks to me like the most similar one is actually Rage (which uses the other two), but I haven't had time to check it out carefully.
I think that, as with ULM, matpopmod is a clear winner in terms of "pure" matrix population models and of documentation. In fact I was surprised by how little is implemented in those libraries -- usually, only a single measure of generation time (and in my opinion no necessarily the best one), for instance.
I think matpopmod is also "more rigorous", in the same sense as before; it was not too hard for me to find matrices that could trick popbio, although I haven't found anything scandalous. In fact, I was a bit surprised that the example that raises UnexpectedMathError
described in the FAQ does not cause any issue with popbio; this is how the dominant eigenvalue is identified:
lmax <- which.max(Re(ev$values))
which is fool-proof, so I am probably going to use that (and then rewrite the FAQ, removing the nice example I had found... In fact, I might as well remove the whole section because besides periodic matrices, I cannot find an example of a matrix that would trigger this error; it really shouldn't occur...).
Those libraries also include functionalities that are currently not in matpopmod, such as stochastic analysis.