Introducing the wiqid package
|Back to home page||
The wiqid package for R
statistical software provides Quick and Dirty functions for the
analysis of Wildlife data.|
Currently it has functions for estimating occupancy, abundance from closed captures, density from spatial capture-recaptures, and survival from mark-recapture data, plus a slew of functions for species richness and alpha and beta diversity.
It is intended to be used for (1) simulations and bootstraps, (2) teaching, and (3) introducing Bayesian methods. And it should work on all platforms: Windows, Linux, and Mac.
Simulations and bootstraps
wiqid started life as a collection of Quick functions with no 'sanity checks' (hence Dirty) for use in long runs of simulations in minimum time. One upshot of this requirement is the range of functions for each type of analysis, with simpler and faster functions available for the simpler models, while still producing identical results. We used wiqid during two simulations workshops in 2013.
In our basic stats workshops we originally aimed to provide participants with hands-on experience of using the industry-standard software (specifically, PRESENCE, DISTANCE, MARK and EstimateS). But it has become obvious that the time would be better spent discussing basic concepts, the assumptions of the analysis, and appropriate study designs. We also wanted time to explore Bayesian methods in parallel with maximum likelihood/information theoretic methods.
In this context, Quick means minimum user time rather than run time, in particular a user interface which is consistent with the standard functions lm and glm and with secr.fit in the secr package (Efford, 2013), all of which we use in basic workshops. We use R's formula notation (y ~ x1 + x2 +...) to specify models and straight-forward data frames for data. We used wiqid for two basic workshops in 2013.
We had already successfully used the BEST package (Kruschke & Meredith, 2013) to introduce participants to Bayesian analysis and posterior probability distributions in the form of MCMC chains. The aim is to provide functions which -
A few Bayesian functions were added to wiqid during the last basic workshop (Dec 2013) and participants were excited by the possibilities offered by Bayesian analysis.
Most of the new functions were written to meet workshop deadlines. I now need to revise these to improve speed and to write test files.
We need a few extra functions for more complex models, notably two-species occupancy models and Pollock's robust model for survival.
Bayesian functions for more complex models would be good, but probably need parallel processing for speed and automated checking of convergence and effective sample size.
Back in 2007 I looked at the source code for WiSP (Zucchini et al 2007) and learnt a lot about coding for maximum likelihood estimation; I may well have used bits to WiSP code in my simulation functions which were later incorporated into wiqid. Murray Efford's secr package (Efford 2013) was the inspiration for the user interface and syntax; I liked his use of double-sided formulae to define models, and stole his code for turning these into named lists. John Kruschke's code for BEST, which became the BEST package, opened the way for Quick and Dirty Bayesian functions for the main wildlife-related models.
Efford, M. G. (2013). secr: Spatially explicit capture-recapture models. R package version 2.7.0. http://CRAN.R-project.org/package=secr
John K. Kruschke and Mike Meredith (2013). BEST: Bayesian Estimation Supersedes the t-Test. R package version 0.2.0. http://CRAN.R-project.org/package=BEST
Zucchini, W., Borchers, D.L., Erdelmeier, M., Rexstad, E. and Bishop, J. 2007. WiSP 1.2.4. Institut fur Statistik und Okonometrie, Geror-August-Universitat Gottingen, Platz der Gottinger Seiben 5, Gottingen, Germany.
| Updated 5 Jan 2014 by Mike Meredith|