| AHMbook-package | R Documentation |
Provides functions to simulate data sets from hierarchical ecological models, including all the simulations described by Marc Kéry and Andy Royle in the two-volume publication, Applied Hierarchical Modeling in Ecology: analysis of distribution, abundance and species richness in R and BUGS, Academic Press (Vol 1, 2016; Vol 2, 2021), plus new models developed after publication of the books.
It also has all the utility functions and data sets needed to replicate the analyses shown in the books.
sim.fnSimulate a homogeneous Poisson point process and illustrate the fundamental relationships between intensity, abundance and occurrence (AHM1 - section 1.1)
data.fn Simulate count data that are replicated in space and in time according to the binomial N-mixture model of Royle (2004) (this is for much simpler cases than is possible with function simNmix in Chapter 6 below) (AHM1 - 4.3)
simNmixSimulate count data and individual detection histories for binomial and multinomial mixture models respectively under a wide range of conditions (AHM1 - 6.9.3)
simpleNmixSimulate count data under a very simple version of the binomial mixture model, with time for space substitution (AHM1 - 6.12)
playRNPlay Royle-Nichols (RN) model: generate count data under the binomial N-mixture model of Royle (2004), then 'degrade' the data to detection/nondetection and fit the RN model using unmarked and estimate site-specific abundance (AHM1 - 6.13.1)
sim.ldataSimulate data under a non-hierarchical line transect distance sampling model (AHM1 - 8.2.3)
sim.pdataSimulate data under a non-hierarchical point transect (= point count) distance sampling model (AHM1 - 8.2.5.1)
simHDSSimulate data under a hierarchical distance sampling protocol (line or point) (AHM1 - 8.5.1)
simHDSpoint A simplified version of simHDS for point transects only.
simHDSgSimulate data under a hierarchical distance sampling (HDS) protocol with groups (AHM1 - 9.2.1)
simHDStrSimulate data under a time-removal/distance sampling design (AHM1 - 9.3.2)
simHDSopenSimulate open hierarchical distance sampling data (AHM1 - 9.5.4)
issj.simSimulate data under the open distance sampling protocol for the Island Scrub Jays (AHM1 - 9.7.1)
sim.spatialDSSimulate data under a basic spatial distance sampling model (AHM1 - 9.8.3)
sim.spatialHDSSimulate data under a spatial hierarchical distance sampling model (AHM1 - 9.8.5)
simIDSSimulate data for an integrated distance sampling, point count and occupancy study
simOccSimulate detection/nondetection data under static occupancy models under a wide range of conditions (AHM1 - 10.5)
simOccCatAs above, but allows simulation of categorical covariates
sim3OccSimulate detection/nondetection data under a static 3-level occupancy model (AHM1 - 10.10)
simOccttdSimulate 'timing data' under a static time-to-detection occupancy design (AHM1 - 10.12.1)
wigglyOccSimulate detection/nondetection data under a static occupancy model with really wiggly covariate relationships in occupancy and detection probability (AHM1 - 10.14)
simCommSimulate detection/nondetection or count data under a community occupancy or abundance model respectively (AHM1 - 11.2)
simNpCSimulate data on abundance (N), detection probability (p) and resulting counts (C) under a counting process with imperfect detection (AHM2 - 1.2)
simPOPSimulate count data under a demographic state-space, or Dail-Madsen, model (no robust design) (AHM2 - 1.7.1)
simPHSimulate count data with phenological curves within a year (AHM2 - 1.8.1)
simDM0Simulate count data from a Dail-Madsen model under a robust design, no covariates (AHM2 - 2.5.1)
simDMSimulate count data from a Dail-Madsen model under a robust design, with covariates (AHM2 - 2.5.5)
simMultMixSimulate “removal” count data from a multinomial-mixture model (AHM2 - 2.7.1)
simFrogDiseaseSimulate detection data for diseased frogs (AHM2 - 2.9.1)
simCJSSimulate individual capture history data under a Cormack-Jolly-Seber (CJS) survival model (AHM2 - 3.2.2)
simDynoccSimulate detection/nondetection data under a dynamic occupancy model under a wide range of conditions (AHM2 - 4.4)
simDemoDynoccSimulate detection/nondetection data under a demographic dynamic occupancy model (AHM2 - 4.12)
simDCMSimulate detection/nondetection data under a general dynamic community model (site-occupancy variant) (AHM2 - 5.2)
simDynoccSpatial Simulate detection/nondetection data under a dynamic occupancy model with spatial covariate and spatial autocorrelation (AHM2 - 9.6.1.1). See also simDynoccSpatialData
simExpCorrRFSimulate data from a Gaussian random field with negative exponential correlation function (AHM2 - 9.2)
simOccSpatialSimulate detection/nondetection data under a spatial, static occupancy model for a real landscape in the Bernese Oberland (Swiss Alps) (AHM2 - 9.2)
simNmixSpatialSimulate counts under a spatial, static binomial N-mixture model for a real landscape in the Bernese Oberland (Swiss Alps) (AHM2 - 9.2)
simPPeSimulate a spatial point pattern in a heterogeneous landscape and show aggregation to abundance and occurrence ('e' for educational version) (AHM2 - 10.2)
simDataDKSimulate data for an integrated species distribution model (SDM) of Dorazio-Koshkina (AHM2 - 10.6.1)
simSpatialDSlineSimulate line transect distance sampling data with spatial variation in density (AHM2 - 11.5)
simSpatialDSteSimulate data for replicate line transect distance sampling surveys with spatial variation in density and temporary emigration (AHM2 - 11.8.1)
simDSMSimulate line transect data for density surface modeling (AHM2 - 11.10.1)
BerneseOberlandLandscape data for the Bernese Oberland around Interlaken, Switzerland (AHM2 - 9.2)
crestedTitCrested Tit data from the Swiss Breeding Bird Survey MHB (Monitoring Häufige Brutvögel) for 1999 to 2015 (AHM2 - 1.3)
cswaChestnut-sided Warbler data for point counts and spot-mapping from White Mountain National Forest (AHM2 - 2.4.3)
crossbillAHMCrossbill data from the Swiss Breeding Bird Survey for 2001 to 2012 (AHM2 - 4.9)
dragonfliesToy data set used in AHM1 - 3.1
duskySalamandersCounts of juvenile vs adult salamanders over 7 years (AHM2 - 2.9.2)
EurasianLynxData for Eurasian Lynx in Italy and Switzerland (AHM2 - 7.3.2)
FinnmarkData from surveys of birds in Finnmark in NE Norway (AHM2 - 5.7)
FrenchPeregrinesDetection data for peregrines in the French Jura (AHM2 - 4.11)
greenWoodpeckerCount data for Green Woodpeckers in Switzerland from the MHB (AHM2 - 2.2)
HubbardBrookPoint count data for warblers from Hubbard Brook, New Hampshire (AHM2 - 8.2)
jayThe European Jay data set (from the MHB) is now included in unmarked (AHM1 - 7.9)
MesoCarnivoresCamera trap data for 3 species of meso-carnivores (AHM2 - 8.2)
MHB2014Complete data from the Swiss Breeding Bird Survey MHB (Monitoring Häufige Brutvögel) for the year 2014 (AHM1 - 11.3)
spottedWoodpeckerData for Middle Spotted Woodpeckers in Switzerland (AHM2 - 4.11.2)
SwissAtlasHaA 1ha-scale subset of the count data from the Swiss Breeding Bird Atlas (AHM2 - 8.4.2)
SwissEagleOwlsTerritory-level, multi-state detection/nondetection data for Eagle Owls in Switzerland (AHM2 - 6.4)
SwissMarbledWhiteData from the Biodiversity Monitoring Program (LANAG) in the Swiss Canton of Aargau for Marbled White butterfly (AHM2 - 1.8.2)
SwissSquirrelsCount data for Red Squirrels in Switzerland from the Swiss breeding bird survey MHB (AHM1 - 10.9)
SwissTitsData for 6 species of tits in Switzerland from from the Swiss breeding bird survey MHB during 2004 to 2013 (AHM1 - 6.13.1)
treeSparrowData for Tree Sparrows in Alaska (AHM2 - 11.8.4)
ttdPeregrineTime-to-detection data for Peregrines (AHM1 - 10.12.2)
UKmarbledWhiteData from the UK Butterfly Monitoring Scheme (UKBMS) for Marbled White butterfly (AHM2 - 1.8.2)
wagtailDistance sampling data for Yellow Wagtails in The Netherlands (AHM1 - 9.5.3)
waterVolesDetection/nondetection data for the Mighty Water Vole of Scotland (AHM2 - 7.2.2)
wigglyLineCoordinates for a wiggly transect line (AHM2 - 11.9)
willowWarblerCapture-history (survival) data for Willow Warblers in Britain (AHM2 - 3.4.1)
ppc.plotPlot results from posterior predictive checks in section AHM1 - 6.8, for a fitted binomial N-mixture model object with JAGS
plot_Nmix_resiDo diagnostic plots for one binomial N-mixture model fitted with all three mixture distributions currently available in unmarked: Poisson, negative binomial and zero-inflated Poisson (AHM1 - 6.9.3)
map.Nmix.resiProduce a map of the residuals from a binomial N-mixture model (see Section AHM1 - 6.9.3)
instRemPiFun, crPiFun, crPiFun.Mb, MhPiFunDefine the relationship between the multinomial cell probabilities and the underlying detection probability parameters (i.e., a pi function) in various designs (AHM1 - 7.8 and AHM2 - Chapter 2)
spline.prepPrepare input for BUGS model when fitting a spline for a covariate (AHM1 - 10.14)
graphSSMPlot trajectories of counts and latent abundance from a fitted Gaussian state-space model (AHM2 - 1.6.1)
ch2marrayConvert capture history data to the m-array aggregation (AHM2 - 3.4.1)
valid_dataPartial validation of simulated data with false positives (AHM2 - 7.6.2)
getLVcorrMatCompute the correlation matrix from an analysis of a latent variable occupancy or binomial N-mixture model (AHM2 - 8.4.2)
zinitGenerate starting values for fitting survival models (introduced in AHM2 - 3.2.3).
standardizeStandardize covariates to mean 0, SD 1.
fitstats, fitstats2Calculate fit-statistics used in parboot GOF tests throughout the book (eg, Sections AHM1 - 7.5.4, AHM1 - 7.9.3, AHM2 - 2.3.3)
e2distCompute a matrix of Euclidean distances
image_scaleDraw scale for image (introduced in chapter AHM1 - 9.8.3)
bigCrossCorrReport cross-correlations above a given threshold
Color_RampsColor ramps for use with image or raster plots
Marc Kéry, Andy Royle, Mike Meredith
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.