Skip to main content
Dryad logo

A hierarchical N-mixture model to estimate behavioral variation and a case study of Neotropical birds


Ke, Alison; Sollmann, Rahel; Frishkoff, Luke; Karp, Daniel (2022), A hierarchical N-mixture model to estimate behavioral variation and a case study of Neotropical birds, Dryad, Dataset,


Understanding how and why animals use the environments where they occur is both foundational to behavioral ecology and essential to identify critical habitats for species conservation. However, some behaviors are more difficult to observe than others, which can bias analyses of raw observational data. To our knowledge, no method currently exists to model how animals use different environments while accounting for imperfect behavior-specific detection probability. We developed an extension of a binomial N-mixture model (hereafter the behavior N-mixture model) to estimate the probability of a given behavior occurring in a particular environment while accounting for imperfect detection. We then conducted a simulation to validate the model’s ability to estimate the effects of environmental covariates on the probabilities of individuals performing different behaviors. We compared our model to a naïve model that does not account for imperfect detection, as well as a traditional N-mixture model. Finally, we applied the model to a bird observation dataset in Northwest Costa Rica to quantify how three species behave in forests and farms. Simulations and sensitivity analyses demonstrated that the behavior N-mixture model produced unbiased estimates of behaviors and their relationships with predictor variables (e.g., forest cover, habitat type). Importantly, the behavior N-mixture model accurately characterized uncertainty, unlike the naïve model which often suggested erroneous effects of covariates on behaviors. When applied to field data, the behavior N-mixture model suggested that Hoffmann’s woodpecker (Melanerpes hoffmanii) and Inca dove (Columbina inca) behaved differently in forested versus agricultural habitats, while turquoise-browed motmot (Eumomota superciliosa) did not. Thus, the behavior N-mixture model can help identify habitats that are essential to a species’ life cycle (e.g., where individuals nest, forage) that non-behavioral models would miss. Our model can greatly improve the appropriate use of behavioral survey data and conclusions drawn from them. In doing so, it provides a valuable path forward for assessing the conservation value of alternative habitat types.



The datasets uploaded here were collected through avian point-count surveys in Northwest Costa Rica. Read the methods section in the publication and the supplementary information for more details.

Usage Notes

We are uploading eight data sets that refer to the ecological data and basic physical parameters of the study area, and one file containing the code used for our simulation study. Read the README file for a complete description of each file.


National Geographic Society, Award: NGS-67543R-20

National Science Foundation, Award: GRFP