DOI: 10.5061/dryad.mpg4f4r8b
title: Variations in risk-taking behaviour mediate matrix mortality's impact on biodiversity under fragmentation

description: The impact of fragmentation on biodiversity is driven by more than the
 spatial configuration of suitable habitat patches. Habitat is embedded in
 the surrounding anthropogenic land cover, known as the matrix, which plays
 a key role in species movement and connects the fragmented habitat.
 Whether the matrix is a barrier or a conduit to movement depends on the
 mortality of the moving individuals. However, individuals differ in their
 behavioural response to the risk posed by the matrix, with the willingness
 to enter the matrix depending on an individual's risk-taking
 behaviour. This individual-level behavioural variability is rarely
 considered but represents an additional mechanism shaping inter- and
 intraspecific competition as well as evolutionary behavioural responses.
 We used an individual-based model to scale up from individual foraging
 movements to the resulting community structure of a competitive small
 mammal community in differently fragmented landscapes. The model
 interactively considers extrinsic matrix conditions, given a certain
 mortality rate, and individual differences in intrinsic movement decisions
 when moving into the matrix. The model was used to investigate the
 consequences of fragmentation and matrix mortality for species and
 behavioural diversity. Low matrix mortality resulted in a positive effect
 of fragmentation on species diversity. At the same time, it led to a high
 average risk-taking behaviour. While this was an important adaptive
 response to fragmentation, it also led to a loss of intraspecific
 diversity. High matrix mortality reversed the effect of fragmentation,
 leading to a drastic loss of species with increasing fragmentation. High
 mortality risk reduced average risk-taking, especially at high
 fragmentation. Study findings suggest that the feasibility of movement in
 the matrix can influence species diversity and evolutionary responses of
 movement-related behavioural traits in fragmented landscapes. The matrix
 may thus play a key role in reconciling contrasting empirical results and
 provides a promising tool for future biodiversity conservation.
description: This repository provides the source code for the implementation
 of a dynamic and spatially explicit individual-based community model as
 well as the used input file to derive our results. The dataset was
 simulated using the individual-based community model (software
 downloadable from zenodo) and is provided as CSV files. Their
 visualization, as in the paper, is included as R-Scripts. 
description: # Variations in risk-taking behaviour mediate matrix mortality's
 impact on biodiversity under fragmentation
 [https://doi.org/10.5061/dryad.mpg4f4r8b](https://doi.org/10.5061/dryad.mpg4f4r8b) The data files have been generated with the individual-based small mammal community model. The R scripts contain the processing of the data and generation of the paper’s main figures. ## Description of the data and file structure The simulated data comes in 4 separate data files. Each simulation is initialized with a randomly generated seed to facilitate pseudo-randomness. The seed is unique for each simulation and therefore also functions as a unique ID. It is used to combine the several output files for each simulation. ##### 1) The *scenario* file stores the user-determined information for each simulation: | Column Name: | Definition: | | :-------------- | :----------------------------------------------------------------------------------------------------------------------------------------------- | | Seed | Unique seed for each simulation. | | Run | Run defines the replication for each combination of variables. | | HabitatAmount | Habitat amount in the landscape as a fraction. | | Fragmentation | Categorizing the level of fractal fragmentation. | | Behaviour | Categorizing the behavioral scenarios as either homogeneous „riskavoiding“, „ risk-seeking“ or heterogenous „risk-diverse“ communities | | MatrixEffect | Categorizing the effect of the matrix, either „no costs“, „deferred costs“, or „mortality“ | | MortalityChance | Reports the mortality probability in a single matrix cell. 100 indicates deferred costs with no direct mortality but increased locomotion costs. | ##### 2) The *community* file reports averaged measures for the whole community for each day of a simulation: | Column Name: | Definition: | | :----------- | :--------------------------------------------------------------------------------------------------------------------------- | | Seed | Unique seed for each simulation. | | Day | Reports the day of the simulation. | | Richness | Number of species in the community. | | ENS | Effective number of species in the community, calculated as the exponential of the Shannon diversity index of the community. | | #Individuals | Total number of individuals in the community. | | Competition | Mean number of foraging individuals per habitat cell per day. | ##### 3) The *species* file contains information on each of the ten simulated species separately for the last 300 days of each simulation: | Column Name: | Definition: | | :---------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------- | | Seed | Unique seed for each simulation. | | Day | Reports the day of the simulation. | | Species | Species identity is reported as a species ID going from 0 to 9. It is also used to categorize the behavioral types along the continuum from 0 to 1. | | Abundance | Reporting the number of individuals belonging to a species at this time. | | JuvenileSuccess | Percentage of juveniles that were able to successfully establish their own home range at this time. | | SpeciesStarvation | Daily proportion of the species’ population that died due to starvation. | | SpeciesMatrix | Daily proportion of the species’ population that died moving through thematrix. | | BTStarvation | Daily proportion of the individuals belonging to the associated behavioral types that died due to starvation. | | BTMatrix | Daily proportion of the individuals belonging to the associated behavioral types that died moving through the matrix. | ##### 4) The *individuals* file contains information on each individual present for the last day of a simulation. Values are averaged over the current lifespan of the individual. | Column Name: | Definition: | | :------------ | :---------------------------------------------------------------------------------------------------------------------------------------- | | Seed | Unique seed for each simulation. | | Day | Reports the day of the simulation. | | ID | Reports the unique identifier for each individual. | | RiskTaking | Reports the risk-taking trait value (between 0-1). | | Bodymass | Reports an individual’s body mass in grams. | | Species | Species identity is reported as a species ID going from 0 to 9. | | HRCells | Gives an individual’s total average daily home range area in number of cells (each cell has an area of 10 sqm). | | MatrixCells | Gives an individual’s average matrix area in its home range in number of cells (each cell has an area of 10 sqm). | | HabitatCells | Gives an individual’s average habitat area in its home range in number of cells (each cell has an area of 10 sqm). | | Diameter | Reports the diameter of an individual’s home range in meters. | | MaxDist | Reports the average of an individual’s daily furthest foraging bouts from its central place in meters. | | firstCrossing | Reports the average completeness of an individual’s home range before it ventures into the matrix for the first time each day in percent. | ## Code/Software The data files do not require specific software. The model can be compiled using a C++ compiler, the setup and usage of the model are explained in the respective README. Required are a C++ compiler (e.g., clang from XCode) and Qt ([https://www.qt.io/download-qt-installer](https://www.qt.io/download-qt-installer)), min. version 4.