migrate [intermediate stability](https://github.com/microbiome/microbiome/blob/master/R/intermediate_stability.R) from microbiome