Friday, January 5, 2018

Best to avoid using B1 breadth metric in environment space

This just came to light relatively recently: the latin hypercube version of the B1 metric in environment space is probably not trustworthy as currently implemented.  Due to the combination of standardizing the distribution and the use of logs in the calculation, there's a dependence on sample size that makes the metric fail to converge.  For an illustration, here's B2 as a function of sample size:

That's behaving as you'd like it to - seems to be converging on a relatively stable value, not changing much with additional sampling (note the scale of the Y axis).

Now look at B1:

There's an obvious trend here with increasing sample size, and the scale of the Y axis is such that those differences could be quite significant. 

At some future date we may figure out how to adjust for this, but for now I'd say just avoid using B1 in environment space altogether.

Monday, November 20, 2017

Pardon our dust

We're doing a whole bunch of stuff to the ENMTools R package right now.  A lot of it is below the hood (cleaning up dependencies for CRAN and whatnot), but some of it is in service of implementing new functionality.  Anyway, in the process of fixing a few things we also broke a few things, so if you've downloaded ENMTools from the main branch in the past few days you might be having some trouble.  I've fixed the bits that I have found so far, and the new code is now up on the main branch.  We're going to make a real push over the next little while to get some testthat code working and get set up with continuous integration to avoid these mishaps in the future. 

Monday, October 16, 2017

Model-based inference in historical and ecological biogeography 2017!

Matthew van Dam and I will be offering a new class in Barcelona with Transmitting Science this year, based in large part on the class that Nick Matzke and I taught last year.  It's called Model-based Inference in Historical and Ecological Biogeography, and if last year was any indication it's going to be a lot of fun.  We'll mostly be focusing on BioGeoBEARS and the new ENMTools R package, and there's a whole lot of very cool stuff going on with both.  Join us if you can!

Saturday, April 29, 2017

Solution to erroneous "please update your maxent program to version 3.3.3b or later" error when running maxent from dismo & ENMTools

I originally encountered this problem when trying to run maxent from ENMTools; but it turns out it was a combination of problem with the dismo package, and with my Mac machine having different versions of java installed (1.6 and 1.8).

I am pasting the solution that worked for me below, and to other relevant lists if I find them, since I didn't find a direct answer online.

Thanks - Nick

Thursday, October 13, 2016

Nice tutorial on conducting background tests using the Perl version of ENMTools

Here's a really nice tutorial by Daniel Romero on how to do the background test in the standalone version of ENMTools.  He walks you through setting up the program, running the analysis, and how to avoid some of the errors that might crop up when trying to run the software.

Thanks, Daniel!

Wednesday, September 28, 2016

RWTY post: New vignette for diagnosing MCMC convergence and lack thereof

This was requested by a couple of reviewers on the forthcoming RWTY app note.  It's something we had discussed doing anyway, but it's good that they forced us to sit down and do it because it's super helpful.  Basically it's a graphical rundown of two different data sets and what you can learn from the absolute legion of plots RWTY produces.  This is very much a first draft, but it's all there.  My hands are aching for typing; it was 5000 words' worth of yammering within the course of about eight hours.

It's also available in the newest version of RWTY on github by using browseVignettes("rwty")

RWTY: R We There Yet? A package for looking at MCMC chain performance in Bayesian phylogenetics

In case you're wondering why the ENMTools posts and Git commits have slammed to a halt, it's because my other R package (RWTY) just took focus.  We got really good reviewer comments back, but they require a bit of work and have a deadline so for the moment they take precedence.  I've also decided I'm going to start blogging about RWTY here along with ENMTools, because RWTY is cool as can be and I'll be darned if I want to start another blog for it.

You can find RWTY at

It's a collaboration between me, Rob Lanfear, and Anthony Geneva, and I think it's pretty darn special.