We describe NIMBLE, a system for programming statistical algorithms for general model structures within R. NIMBLE is designed to meet three challenges: flexible model specification, a language for programming algorithms that can use different models, and a balance between high-level programmability and execution efficiency. For model specification, NIMBLE extends the BUGS language and creates model objects, which can manipulate variables, calculate log probability values, generate simulations, and query the relationships among variables. For algorithm programming, NIMBLE provides functions that operate with model objects using two stages of evaluation. The first stage allows specialization of a function to a particular model and/or nodes, such as creating a Metropolis-Hastings sampler for a particular block of nodes. The second stage allows repeated execution of computations using the results of the first stage. To achieve efficient second-stage computation, NIMBLE compiles models and functions via C++, using the Eigen library for linear algebra, and provides the user with an interface to compiled objects. The NIMBLE language represents a compilable domain-specific language (DSL) embedded within R. This paper provides an overview of the design and rationale for NIMBLE along with illustrative examples including importance sampling, Markov chain Monte Carlo (MCMC) and Monte Carlo expectation maximization (MCEM).
The ongoing recovery of terrestrial large carnivores in North America and Europe is accompanied by intense controversy. On the one hand, reestablishment of large carnivores entails a recovery of their most important ecological role, predation. On the other hand, societies are struggling to relearn how to live with apex predators that kill livestock, compete for game species, and occasionally injure or kill people. Those responsible for managing these species and mitigating conflict often lack fundamental information due to a long-standing challenge in ecology: How do we draw robust population-level inferences for elusive animals spread over immense areas? Here we showcase the application of an effective tool for spatially explicit tracking and forecasting of wildlife population dynamics at scales that are relevant to management and conservation. We analyzed the world’s largest dataset on carnivores comprising more than 35,000 noninvasively obtained DNA samples from over 6,000 individual brown bears (Ursus arctos), gray wolves (Canis lupus), and wolverines (Gulo gulo). Our analyses took into account that not all individuals are detected and, even if detected, their fates are not always known. We show unequivocal quantitative evidence of large carnivore recovery in northern Europe, juxtaposed with the finding that humans are the single-most important factor driving the dynamics of these apex predators. We present maps and forecasts of the spatiotemporal dynamics of large carnivore populations, transcending national boundaries and management regimes.
Dynamic population models typically aim to predict demography and the resulting population dynamics in relation to environmental variation. However, they rarely include the diversity of individual responses to environmental changes, thus hampering our understanding of demographic mechanisms. We develop an integrated integral projection model (IPM2) that is a combination of an integrated population model (IPMpop) and an integral projection model (IPMind). IPM2 includes interactions between environmental and individual effects on demographic rates and can forecast both population size and individual trait distributions. First, we study the performance of this model using eight simulated scenarios with variable reproductive selective pressures on an individual trait. When the individual trait interacts with the environmental variable and the selective pressure on the individual trait is nonlinear, only IPM2 produces adequate predictions, because IPMind does not link predictions between the population level and observed data and because IPMpop does not include the individual trait. Second, we apply IPM2 to a population of barn swallows. The model accurately predicts trends of the barn swallow population while also providing mechanistic insights. High precipitation negatively influenced population dynamics through delaying laying dates, which lowered reproductive and survival rates. To predict the future of populations, we need to understand their individual drivers and thus include individual responses to their environment while following the entire population. As a consequence, IPM2 will improve our ability to test ecological and evolutionary hypotheses and improve the accuracy of population forecasting to aid management programs.
Ecological pressures such as competition can lead individuals within a population to partition resources or habitats, but the underlying intrinsic mechanisms that determine an individual's resource use are not well understood. Here we show that an individual's own energy demand and associated competitive ability influence its resource use, but only when food is more limiting. We tested whether intraspecific variation in metabolic rate leads to microhabitat partitioning among juvenile Atlantic salmon (Salmo salar) in natural streams subjected to manipulated nutrient levels and subsequent per capita food availability. We found that individual salmon from families with a higher baseline (standard) metabolic rate (which is associated with greater competitive ability) tended to occupy fasterflowing water, but only in streams with lower per capita food availability. Faster-flowing microhabitats yield more food, but high metabolic rate fish only benefited from faster growth in streams with high food levels, presumably because in low-food environments the cost of a high metabolism offsets the benefits of acquiring a productive microhabitat. The benefits of a given metabolic rate were thus context dependent. These results demonstrate that intraspecific variation in metabolic rate can interact with resource availability to determine the spatial structuring of wild populations.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.
customersupport@researchsolutions.com
10624 S. Eastern Ave., Ste. A-614
Henderson, NV 89052, USA
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
Copyright © 2024 scite LLC. All rights reserved.
Made with 💙 for researchers
Part of the Research Solutions Family.