Kasper Kristensen
Current Organizations / Institutes
The organizations/institutes from the scholar's latest article
Research Subjects
Kasper Kristensen has a total of 15 co-authors. Here are the top co-authors by number of shared publications:
- Casper Willestofte Berg
National Institute of Aquatic Resources Technical University of Denmark Lyngby Denmark
2 shared publications - Francois Bastardie
National Institute of Aquatic Resources, Danish Technical University, Lyngby, Denmark
2 shared publications - J. Rasmus Nielsen
Technical University of Denmark, National Institute for Aquatic Resources (DTU Aqua)
2 shared publications - Anders Nielsen
Technical University of Denmark, National Institute of Aquatic Resources, Kgs. Lyngby, Denmark
1 shared publication - Beatriz S. Dias
Cooperative Institute for Climate, Ocean, and Ecosystem Studies University of Washington Seattle Washington USA
1 shared publication - Bo Lundgren
Technical University of Denmark, National Institute of Aquatic Resources, Hirtshals, Denmark
1 shared publication
Latest Publications
- Open Access
- 29 October 2026
- Published by Wiley in Ecology and Evolution
- Vol. 16 (11)
RTMB: An R Package for Fitting Latent Variable Models With Template Model Builder
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 .
- 29 October 2026
- Published by Wiley in Ecology and Evolution
- Vol. 16 (11)
Open AccessRTMB: An R Package for Fitting Latent Variable Models With Template Model Builder
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 .
- 30 January 2026
- Published by The R Foundation
pmrm: Progression Models for Repeated Measures
A progression model for repeated measures (PMRM) is a continuous-time nonlinear mixed-effects model for longitudinal clinical trials in progressive diseases. Unlike mixed models for repeated measures (MMRMs), which estimate treatment effects as linear combinations of additive effects on the outcome scale, PMRMs characterize treatment effects in terms of the underlying disease trajectory. This framing yields clinically interpretable quantities such as average time saved and percent reduction in decline due to treatment. This package implements frequentist PMRMs by Raket (2022) using 'RTMB' by Kristensen (2016) .
- 30 January 2026
- Published by The R Foundation
pmrm: Progression Models for Repeated Measures
A progression model for repeated measures (PMRM) is a continuous-time nonlinear mixed-effects model for longitudinal clinical trials in progressive diseases. Unlike mixed models for repeated measures (MMRMs), which estimate treatment effects as linear combinations of additive effects on the outcome scale, PMRMs characterize treatment effects in terms of the underlying disease trajectory. This framing yields clinically interpretable quantities such as average time saved and percent reduction in decline due to treatment. This package implements frequentist PMRMs by Raket (2022) using 'RTMB' by Kristensen (2016) .
- Open Access
- 27 August 2025
- Published by Wiley in Fish and Fisheries
Bottom‐Up Interactions in State‐Space Age‐Structured Models Using Mass‐Balance Dynamics
Age‐structured models are used worldwide to regulate fisheries. These models typically ignore top‐down interactions (predation affecting natural mortality) and bottom‐up interactions (consumption affecting individual growth, reproduction, or survival), whereas multispecies catch‐at‐age models often incorporate top‐down but not bottom‐up interactions. While Ecopath‐with‐Ecosim (EwE) incorporates both top‐down and bottom‐up interactions along with age‐structured dynamics, it is not typically fitted to age‐composition data. We extend Ecostate (a state‐space version of EwE) to incorporate age‐structured dynamics while fitting to age‐structured data and use this to illustrate how to add bottom‐up interactions to age‐structured models. Specifically, we add age‐structured dynamics and likelihood components for age‐composition and weight‐at‐age data while estimating residual variation in larval survival (recruitment deviations) and consumption (weight‐at‐age deviations). As a demonstration, we fit the model to biomass and age‐composition data for two commercial species (Alaska pollock and sablefish) in the Gulf of Alaska, including population dynamics for their major prey, while not fitting weight‐at‐age data so that it can be used for out‐of‐sample evaluation of model performance. The model can be viewed as a multispecies age‐structured model (e.g., estimating adult mortality rates, survey catchability and selectivity, and recruitment variation) and as a mass‐balance ecosystem model (e.g., estimating trophic position and weight‐at‐age based on forage consumption). The predicted weight‐at‐age is weakly correlated with independent measurements for pollock and sablefish but was improved when we incorporated forage biomass indices. We recommend that age‐structured models routinely explore the link between prey consumption and resulting size‐at‐age, whether using coupled predator–prey dynamics or simplifications that treat prey abundance as fixed data.
- 27 August 2025
- Published by Wiley in Fish and Fisheries
Open AccessBottom‐Up Interactions in State‐Space Age‐Structured Models Using Mass‐Balance Dynamics
Age‐structured models are used worldwide to regulate fisheries. These models typically ignore top‐down interactions (predation affecting natural mortality) and bottom‐up interactions (consumption affecting individual growth, reproduction, or survival), whereas multispecies catch‐at‐age models often incorporate top‐down but not bottom‐up interactions. While Ecopath‐with‐Ecosim (EwE) incorporates both top‐down and bottom‐up interactions along with age‐structured dynamics, it is not typically fitted to age‐composition data. We extend Ecostate (a state‐space version of EwE) to incorporate age‐structured dynamics while fitting to age‐structured data and use this to illustrate how to add bottom‐up interactions to age‐structured models. Specifically, we add age‐structured dynamics and likelihood components for age‐composition and weight‐at‐age data while estimating residual variation in larval survival (recruitment deviations) and consumption (weight‐at‐age deviations). As a demonstration, we fit the model to biomass and age‐composition data for two commercial species (Alaska pollock and sablefish) in the Gulf of Alaska, including population dynamics for their major prey, while not fitting weight‐at‐age data so that it can be used for out‐of‐sample evaluation of model performance. The model can be viewed as a multispecies age‐structured model (e.g., estimating adult mortality rates, survey catchability and selectivity, and recruitment variation) and as a mass‐balance ecosystem model (e.g., estimating trophic position and weight‐at‐age based on forage consumption). The predicted weight‐at‐age is weakly correlated with independent measurements for pollock and sablefish but was improved when we incorporated forage biomass indices. We recommend that age‐structured models routinely explore the link between prey consumption and resulting size‐at‐age, whether using coupled predator–prey dynamics or simplifications that treat prey abundance as fixed data.
- Open Access
- 14 September 2021
- Published by Wiley in Ecological Applications
- Vol. 31 (8) , e02453
Bridging the gap between commercial fisheries and survey data to model the spatiotemporal dynamics of marine species
Monitoring and assessment of natural resources often require inputs from multiple data sources. In fisheries science, for example, the inference of a species’ abundance distribution relies on two main data sources, namely commercial fisheries and scientific survey data. Despite efforts to combine these data into an integrated statistical model, their coupling is frequently hampered due to differences in their sampling designs, which imposes distinct bias sources in the estimator of the abundance distribution. We developed a flexible species distribution model (SDM) that can integrate both data sources while filtering out their relative bias contributions. We applied the model on three different age groups of the western Baltic cod stock. For each age group, we tested the model on (1) survey data and (2) integrated data (survey + commercial) as a means to compare their differences and investigate how the inclusion of commercial fisheries data improved the spatiotemporal abundance estimator and parameter estimates. Moreover, we proposed a novel validation approach to evaluate whether the inclusion of commercial fisheries data in the integrated model is not in direct contradiction with the survey data. Following our approach, the results indicated that the use of commercial fisheries data is suitable for the integrated model. Across all age groups, our results demonstrated how commercial fisheries supplied additional information on cod’s spatiotemporal abundance dynamics, highlighting sometimes abundance hot spots that were not detected by the survey model alone. Additionally, the integrated model provided a reduction of up to 20% and 10% in the uncertainty (SE) of the predicted abundance fields and fixed‐effect parameters, respectively. The proposed model represents thus a valuable benchmark for evaluating spatiotemporal dynamics of fish, and strengthens the science‐based advice for marine policymakers.
- 14 September 2021
- Published by Wiley in Ecological Applications
- Vol. 31 (8) , e02453
Open AccessBridging the gap between commercial fisheries and survey data to model the spatiotemporal dynamics of marine species
Monitoring and assessment of natural resources often require inputs from multiple data sources. In fisheries science, for example, the inference of a species’ abundance distribution relies on two main data sources, namely commercial fisheries and scientific survey data. Despite efforts to combine these data into an integrated statistical model, their coupling is frequently hampered due to differences in their sampling designs, which imposes distinct bias sources in the estimator of the abundance distribution. We developed a flexible species distribution model (SDM) that can integrate both data sources while filtering out their relative bias contributions. We applied the model on three different age groups of the western Baltic cod stock. For each age group, we tested the model on (1) survey data and (2) integrated data (survey + commercial) as a means to compare their differences and investigate how the inclusion of commercial fisheries data improved the spatiotemporal abundance estimator and parameter estimates. Moreover, we proposed a novel validation approach to evaluate whether the inclusion of commercial fisheries data in the integrated model is not in direct contradiction with the survey data. Following our approach, the results indicated that the use of commercial fisheries data is suitable for the integrated model. Across all age groups, our results demonstrated how commercial fisheries supplied additional information on cod’s spatiotemporal abundance dynamics, highlighting sometimes abundance hot spots that were not detected by the survey model alone. Additionally, the integrated model provided a reduction of up to 20% and 10% in the uncertainty (SE) of the predicted abundance fields and fixed‐effect parameters, respectively. The proposed model represents thus a valuable benchmark for evaluating spatiotemporal dynamics of fish, and strengthens the science‐based advice for marine policymakers.
- 19 December 2017
- Published by The R Foundation
tmbstan: MCMC Sampling from 'TMB' Model Object using 'Stan'
- 19 December 2017
- Published by The R Foundation
tmbstan: MCMC Sampling from 'TMB' Model Object using 'Stan'
- Open Access
- 14 August 2013
- Published by Public Library of Science (PLoS) in PLOS ONE
- Vol. 8 (8) , e70668
Localisation of Nursery Areas Based on Comparative Analyses of the Horizontal and Vertical Distribution Patterns of Juvenile Baltic Cod (Gadus morhua)
Knowledge of the spatial distribution of juvenile cod is essential for obtaining precise recruitment data to conduct sustainable management of the eastern and western Baltic cod stocks. In this study, the horizontal and vertical distribution and density patterns of settled juvenile 0- and 1-group Baltic cod are determined, and their nursery areas are localised according to the environmental factors affecting them. Comparative statistical analyses of biological, hydrographic and hydroacoustic data are carried out based on standard ICES demersal trawl surveys and special integrated trawl and acoustic research surveys. Horizontal distribution maps for the 2001–2010 cohorts of juvenile cod are further generated by applying a statistical log-Gaussian Cox process model to the standard trawl survey data. The analyses indicate size-dependent horizontal and distinct vertical and diurnal distribution patterns related to the seabed topography, water layer depth, and the presence of hydrographic frontal zones (pycnoclines) as well as intraspecific patterns in relation to the presence of adult cod. The extent of the nursery areas also depends on the cod year class strength. Juvenile cod (≥3 cm) are present in all areas of the central Baltic Sea (CBS), showing broad dispersal. However, their highest density in the Baltic Basins is found at localities with a 40–70 m bottom depth in waters with oxygen concentrations above 2 ml O2.l−1 and temperatures above 5°C. The smallest juveniles are also found in deep sea localities down to a 100 m depth and at oxygen concentrations between 2–4 ml O2.l−1. The vertical, diurnally stratified and repeated trawling and hydroacoustic target strength-depth distributions obtained from the special surveys show juvenile cod concentrations in frontal zone water layers (pycnocline). However, the analyses indicate that in the CBS, juvenile cod of all sizes do not appear to aggregate in dense schooling patterns, which differs from what has been reported from the North Sea.
- 14 August 2013
- Published by Public Library of Science (PLoS) in PLOS ONE
- Vol. 8 (8) , e70668
Open AccessLocalisation of Nursery Areas Based on Comparative Analyses of the Horizontal and Vertical Distribution Patterns of Juvenile Baltic Cod (Gadus morhua)
Knowledge of the spatial distribution of juvenile cod is essential for obtaining precise recruitment data to conduct sustainable management of the eastern and western Baltic cod stocks. In this study, the horizontal and vertical distribution and density patterns of settled juvenile 0- and 1-group Baltic cod are determined, and their nursery areas are localised according to the environmental factors affecting them. Comparative statistical analyses of biological, hydrographic and hydroacoustic data are carried out based on standard ICES demersal trawl surveys and special integrated trawl and acoustic research surveys. Horizontal distribution maps for the 2001–2010 cohorts of juvenile cod are further generated by applying a statistical log-Gaussian Cox process model to the standard trawl survey data. The analyses indicate size-dependent horizontal and distinct vertical and diurnal distribution patterns related to the seabed topography, water layer depth, and the presence of hydrographic frontal zones (pycnoclines) as well as intraspecific patterns in relation to the presence of adult cod. The extent of the nursery areas also depends on the cod year class strength. Juvenile cod (≥3 cm) are present in all areas of the central Baltic Sea (CBS), showing broad dispersal. However, their highest density in the Baltic Basins is found at localities with a 40–70 m bottom depth in waters with oxygen concentrations above 2 ml O2.l−1 and temperatures above 5°C. The smallest juveniles are also found in deep sea localities down to a 100 m depth and at oxygen concentrations between 2–4 ml O2.l−1. The vertical, diurnally stratified and repeated trawling and hydroacoustic target strength-depth distributions obtained from the special surveys show juvenile cod concentrations in frontal zone water layers (pycnocline). However, the analyses indicate that in the CBS, juvenile cod of all sizes do not appear to aggregate in dense schooling patterns, which differs from what has been reported from the North Sea.
- Open Access
- 1 October 2012
- Published by Elsevier in Fisheries Research
- Vol. 129-130, 119-126
Spatial age-length key modelling using continuation ratio logits
- 1 October 2012
- Published by Elsevier in Fisheries Research
- Vol. 129-130, 119-126
Open AccessSpatial age-length key modelling using continuation ratio logits