Bayesian life cycle model : OpenBUGS code

OpenBUGS script supplied as supplemental material

Rochette Sebastien, Le Pape Olivier, Vigneau Joel, Rivot Etienne (2013). A hierarchical Bayesian model for embedding larval drift and habitat models in integrated life cycles for exploited fish. Ecological Applications, 23(7), 1659-1676. Publisher’s official version : , Open Access version : - Bayesian Life Cycle Model

BUGS code to estimate parameters of a full life cycle model

  1. Outputs of an individual-based model for larval drift and survival that provided yearly estimates of the dispersion and mortality of eggs and larvae, from spawning grounds to settlement in several coastal nurseries;
  2. A habitat suitability model, based on juvenile trawl surveys coupled with a geographic information system, to estimate juvenile densities and surface areas of suitable juvenile habitat in each nursery sector;
  3. A statistical catch-at-age model for the estimation of the numbers-at-age and the fishing mortality on subadults and adults.

The following BUGS code refers to a specific scenario of the larvae to juvenile mortality process tested in the associated paper (see paper). This scenario (R3) assumes a density-independent mortality parameter common to all nurseries (a_BH) and a nursery-specific density-dependent mortality parameter (b_BH).

  • Programmer: Sébastien Rochette, August 2012
  • OpenBUGS version : 3.2.2

Continue reading Bayesian life cycle model : OpenBUGS code

Mapping, spatial analyses and GIS with R

Some slides to present GIS with R

If you download the following presentation, you will find a presentation of different functions in the R-software useful for spatial data manipulations. Choosing the right libraries allows to create, import, modify, manipulate and map vector (shapefiles) or matrix (raster) spatial data. Your spatial files can then be used for modeling and spatial interpolation like kriging.

The presentation is can be downloaded here, however, this presentation is in French, although images and r-code provided is normally clear enough for anybody to understand.

This presentation has been realized in 2012. There may be some modifications in functions presented. For instance, in library “sp”, fonction overlay() in now called over().

GIS with R - Spatial Joint
Spatial joint between points and polygons using R-software. Click on the image to get R-code. - Output of spatial distribution modelling using R-software
Output of spatial distribution modelling using R-software. Click on the figure to get the R-code.

Sensitivity of Inverse Community matrix

R-script for inverse community matrix

Lassalle Geraldine, Bourdaud Pierre, Saint-Beat Blanche, Rochette Sebastien, Niquil Nathalie (2014). A toolbox to evaluate data reliability for whole-ecosystem models: Application on the Bay of Biscay continental shelf food-web model. Ecological Modelling, 285, 13-21. Publisher’s official version : , Open Access version :

Also used here:
Rochette Sébastien, Lobry Jeremy, Lepage Mario, Boet Philippe (2009). Dealing with uncertainty in qualitative models with a semi-quantitative approach based on simulations. Application to the Gironde estuarine food web (France). Ecological Modelling, 220, 122-132.
The associated presentation:
Inverse Matrix: an easy tool to test interactions in a trophic network

Construction of the Community matrix from Ecopath models - Community matrix construction

Appendix D. The R (www. code for the sensitivity analysis. The code is given for data stored in a three-sheet Excel file. The original matrix Q is stored in the “net_impacts” sheet and is obtained following steps (i) to (iv) described in Appendix C. The original matrix Q minus 20% is in the “Com_Min” sheet and the original matrix Q plus 20% in the “Com_Max” sheet. They all three give the net impact of a compartment in rows on the compartment in column.

Continue reading Sensitivity of Inverse Community matrix