CBCasper Willestofte Berg

Casper Willestofte Berg

*This is an algorithmically generated author record based on publicly available information.

Current Organizations / Institutes

The organizations/institutes from the scholar's latest article


Casper Willestofte Berg has a total of 22 co-authors. Here are the top co-authors by number of shared publications:


Latest Publications

  • Open Access

    RTMB: An R Package for Fitting Latent Variable Models With Template Model Builder

    by Kasper Kristensen, Anders Nielsen, Christoffer Moesgaard Albertsen, Casper Willestofte Berg, Vanessa Trijoulet

    Hierarchical and latent variable models are fundamental in ecology, fisheries science, and epidemiology, but fitting them efficiently relies on automatic differentiation (AD) combined with approximations such as the Laplace approximation. Template Model Builder ( TMB ) has become a standard tool for this kind of inference in R, but it requires users to write the objective function in C++, which is a potential obstacle for those unfamiliar with it, slows model iteration through compilation, and complicates debugging and simulation. We present RTMB , an R package that exposes the full power of TMB 's AD machinery directly from plain R. Users write the joint negative log‐likelihood as an ordinary R function; RTMB traces it onto an AD tape and hands the result to TMB 's existing optimization, Laplace approximation, and reporting routines. We describe the design of the package, illustrate its use through a worked example, and provide a side‐by‐side comparison with the equivalent TMB implementation of a theta‐logistic state‐space population model. The result is a transparent, debuggable, and pedagogically accessible interface to state‐of‐the‐art latent variable inference, with runtime performance comparable to native TMB .

  • Open Access

    DATRASextra: An R package for streamlined workflows with ICES DATRAS bottom-trawl survey data

    by Tobias K. Mildenberger, Federico Maioli, Casper W. Berg

    Scientific bottom-trawl surveys provide essential fisheries-independent data for fisheries and ecosystem research. In the Northeast Atlantic, the ICES Database of Trawl Surveys (DATRAS) compiles haul-level information, species- and length-specific catch data, and individual biological observations across multiple long-term surveys. However, reproducible workflows for processing and integrating these relational datasets remain challenging. We present DATRASextra , an open-source R package that provides modular end-to-end workflows for accessing, cleaning, harmonising, quality-controlling, and analysing DATRAS survey data. The package supports derivation of standardised haul-level survey variables, integration of multiple surveys, and generation of analysis-ready datasets for downstream applications including stock assessment, biodiversity analyses, and large-scale synthesis efforts such as Fish-Glob.

  • Open Access

    Implementing the precautionary approach into fisheries management: Making the case for probability-based harvest control rules

    by Tobias K. Mildenberger, Casper W. Berg, Alexandros Kokkalis, Adrian R. Hordyk, Chantel Wetzel, Nis S. Jacobsen, André E. Punt, J. Rasmus Nielsen

    The precautionary approach to fisheries management advocates for risk-averse management strategies that include biological reference points as well as decision rules and account for scientific uncertainty. In this regard, two approaches have been recommended: (i) harvest control rules (HCRs) with threshold reference points to safeguard against low stock biomass, and (ii) the P * method, a ‘probability-based HCR’ that reduces the catch limit as a function of scientific uncertainty (i.e. process, model, and observation uncertainty). This study compares the effectiveness of these precautionary approaches in recovering over-exploited fish stocks with various life-history traits and under a wide range of levels of scientific uncertainty. We use management strategy evaluation based on a stochastic, age-based operating model with quarterly time steps and a stochastic surplus production model. The results show that the most effective HCR includes both a biomass threshold as well as the P * method, and leads to high and stable long-term yield with a decreased risk of low stock biomass. For highly dynamics stocks, management strategies that aim for higher biomass targets than the traditionally used B MSY result in higher long-term yield. This study makes the case for probability-based HCRs by demonstrating their benefit over deterministic HCRs and provides a list of recommendations regarding their definition and implementation.


  • Open Access

    Harbor porpoise (Phocoena phocoena) reactions to pingers

    by Lotte Kindt‐Larsen, Casper Willestofte Berg, Simon Northridge, Finn Larsen

    The use of acoustic alarms (pingers) has been mandated in several gill net fisheries around the world. Even though pingers have shown to reduce the incidental catch there are still questions to be answered in relation to effective range, habituation and displacement. In the present studies, the vocalization behavior of porpoises was recorded in response to two different pingers, AQUAmark100 (20–160 kHz) and AQUAmark300 (10 kHz). The Scottish experiment included an AQUAmark100 pinger running in on/off cycles. The pinger was placed in an array of acoustic click detectors (C‐PODs) spaced at different distances from the pinger. In Denmark, three experiments were conducted. One had the same AQUAmark100 pinger placed in a C‐POD array. The second and third experiment used an AQUAmark300 pinger running in on/off cycles. Both trial results of the AQUAmark100 revealed significant pinger reduction effects at 0, 200, and 400 m distance; however, the vocalization behavior reveal no signs of habituation. The studies of the AQUAmark300 revealed a significant pinger effect at 0 m distance and either none or 17% reduction at 300 m distance. At one station, however, habituation effects were found indicated by an increase in clicks over time. These results are important in relation to pinger use and thus fisheries management.


  • glmmTMB: Generalized Linear Mixed Models using Template Model Builder

    by Mollie Brooks, Ben Bolker, Kasper Kristensen, Martin Maechler, Arni Magnusson, Hans Skaug, Anders Nielsen, Casper Berg, Koen van Bentham


  • Open Access

    Spatial age-length key modelling using continuation ratio logits

    by Casper W. Berg, Kasper Kristensen