wiqid-package {wiqid} | R Documentation |
Fast, simple estimation functions for wildlife population models
Description
Quick and dirty functions to estimate occupancy, survival, abundance, species richness and diversity, etc. for wildlife populations.
Details
There are a number of sophisticated programs for the analysis of wildlife data, producing estimates of occupancy, survival, abundance, or density. wiqid began as a collection of fast, bare-bones functions which can be run from R suitable for use when you are generating hundreds of simulated data sets. The package takes its name from the quick-and-dirty nature of the original functions.
We now use wiqid in basic wildlife study design and data analysis workshops, and most functions now have options to check the input data and give informative error messages. Workshop participants have used lm
, glm
and functions in the secr
and BEST
packages. So wiqid tries to match the look and feel of these functions.
All functions use standard data frames or matrices for data input. ML estimation functions return objects of class wiqid
with parameter estimates on the transformed scale (usually logit functions), variance-covariance matrix, and back-transformed ‘real’ values; there are print
, logLik
and predict
methods. Bayesian functions (distinguished by an initial "B") return class mcmcOutput
objects.
Simulations and bootstraps often generate weird data sets, eg. capture histories with no captures. These functions do not throw errors or give warnings if the data are weird, but return NAs if estimates cannot be calculated. Errors may still occur if the data are impossible, eg. 6 detections in 5 occasions.
Note that in version 0.2.0 the scaling of continuous covariates has changed to SD=1 (previously SD=0.5). This means that beta coefficients will now be exactly half the size, matching the output from other software.
The functions are listed by topic below.
SIMPLE BAYESIAN POSTERIORS
Bbinomial | generate draws from a conjugate beta posterior distribution |
Bpoisson | generate draws from a conjugate gamma posterior distribution |
Bnormal | fit a basic normal model to data |
OCCUPANCY
Single-season occupancy
occSS | general-purpose ML function; allows site- and survey-specific covariates |
BoccSS | general-purpose Bayesian implementation of the above |
occSS0 | a basic psi(.) p(.) model, faster if this is all you need |
BoccSS0 | a Bayesian implementation of the psi(.) p(.) model |
occSSrn | Royle-Nichols method |
occSStime | faster if you have only time effects, also does a plot |
occSScovSite | faster if you only have site-specific covariates |
occ2sps | single-season two-species models |
Multi-season occupancy
occMS | general-purpose function; parameters depend on covariates; slow |
occMScovSite | smaller range of covariate options |
occMS0 | a simple multi-season model with four parameters; faster |
occMStime | parameters vary by season; faster |
DENSITY from spatial capture-recapture data
We use the secr package for ML estimation of density. For Bayesian estimation, wiqid offers:
Bsecr0 | a Bayesian implementation of the intercept-only model |
ABUNDANCE from closed-population capture-recapture data
Although data for genuinely closed populations are rare, this is an important conceptual stepping-stone from CJS models to robust models for survival.
closedCapM0 | simple model with constant capture probability |
closedCapMb | permanent behavioural response to first capture |
closedCapMt | capture probability varies with time |
closedCapMtcov | allows for time-varying covariates |
closedCapMh2 | heterogeneity with 2-mixture model |
closedCapMhJK | jackknife estimator for heterogeneity |
SURVIVAL from capture-recapture data
Cormack-Jolly-Seber models
survCJS | model with time-varying covariates |
BsurvCJS | a Bayesian implementation of the above |
survCJSaj | allows for different survival for adults and juveniles |
Pollock's robust design
survRDah | 2-stage estimation of survival and recruitment |
survRD | single stage maximum likelihood estimation |
Note that the RD functions are preliminary attempts at coding these models and have not been fully tested or benchmarked.
SPECIES RICHNESS from species x sample matrices
Rarefaction
richRarefy | Mao's tau estimator for rarefaction |
richCurve | a shell for plug-in estimators, for example... |
richSobs | the number of species observed |
richSingle | the number of singletons observed |
richDouble | the number of doubletons observed |
richUnique | the number of uniques observed |
richDuplicate | the number of duplicates observed |
Coverage estimators
richACE | Chao's Abundance-based Coverage Estimator |
richICE | Chao's Incidence-based Coverage Estimator |
richChao1 | Chao1 estimator |
richChao2 | Chao2 estimator |
richJack1 | first-order jackknife estimator |
richJack2 | second-order jackknife estimator |
richJackA1 | abundance-based first-order jackknife estimator |
richJackA2 | abundance-based second-order jackknife estimator |
richBoot | bootstrap estimator |
richMM | Michaelis-Menten estimator |
richRenLau | Rennolls and Laumonier's estimator |
BIODIVERSITY INDICES
Alpha diversity
All of these functions express diversity as the number of common species in the assemblage.
biodSimpson | inverse of Simpson's index of dominance |
biodShannon | exponential form of Shannon's entropy |
biodBerger | inverse of Berger and Parker's index of dominance |
biodBrillouin | exponential form of Brillouin's index |
Beta diversity / distance
All of these functions produce distance measures (not similarity) on a scale of 0 to 1. The function distShell
provides a wrapper to produce a matrix of distance measures across a number of sites.
distBrayCurtis | complement of Bray-Curtis index, aka 'quantitative Sorensen' |
distChaoJaccCorr | complement of Chao's Jaccard corrected index |
distChaoJaccNaive | complement of Chao's Jaccard naive index |
distChaoSorCorr | complement of Chao's Sorensen corrected index |
distChaoSorNaive | complement of Chao's Sorensen naive index |
distChord | distance between points on a normalised sphere |
distJaccard | complement of Jaccard's index of similarity |
distMorisitaHorn | complement of the Morisita-Horn index of similarity |
distOchiai | complement of the Ochiai coefficient of similarity |
distPreston | Preston's coefficient of faunal dissimilarity |
distRogersTanimoto | complement of the Rogers and Tanimoto's coefficient of similarity |
distSimRatio | complement of the similarity ratio |
distSorensen | complement of the Sorensen or Dice index of similarity |
distWhittaker | Whittaker's index of association |
DATA SETS
dippers | Capture-recapture data for European dippers |
distTestData | artificial data set for distance measures |
GrandSkinks | multi-season occupancy data |
KanhaTigers | camera-trap data for tigers |
KillarneyBirds | abundance of birds in Irish woodlands |
MeadowVoles | mark-recapture data from a robust design study |
railSims | simulated detection/non-detection data for two species of rails |
salamanders | detection/non-detection data for salamanders |
seedbank | number of seeds germinating from samples of soil |
Temburong | counts of tree species in a 1ha plot in Brunei |
TemburongBA | basal area of tree species in a 1ha plot in Brunei |
weta | detection/non-detection data and covariates for weta |
DISTRIBUTIONS
These are convenience wrappers for the related d/p/q/r functions in the stats
package which allow for parameterisation with mean and sd or (for Beta) mode and concentration.
dbeta2 etc | Beta distribution with mean and sd |
dbeta3 etc | Beta distribution with mode and concentration |
dgamma2 etc | Gamma distribution with mean and sd |
dt2 etc | t-distribution with location, scale and df parameters |
dt3 etc | t-distribution with mean, sd and df parameters |
UTILITY FUNCTIONS
AICc | AIC with small-sample correction |
AICtable | tabulate AIC for several models |
allCombinations | model formulae for combinations of covariates |
standardize | a simple alternative to scale .
|
Author(s)
Mike Meredith