simulatePopulation {virtualPollen}R Documentation

Simulates population dynamics for virtual species with different traits.

Description

This function takes as input a dataframe of parameters defining virtual taxa produced by parametersDataframe and fixParametersTypes, a driver or drivers generated with simulateDriver or simulateDriverS, and simulates population dynamics for the given virtual taxa at yearly resolution for the time-length defined by the driver or drivers. Important: note that the variable time runs from left to right, with lower values representing older samples. The model relies on the following set of assumptions:

Usage

simulatePopulation(
  parameters=NULL,
  species="all",
  driver.A=NULL,
  driver.B=NULL,
  drivers=NULL,
  burnin=TRUE
  )

Arguments

parameters

dataframe with parameters.

species

if "all" or "ALL", all species in "parameters" are simulated It also accepts a vector of numbers representing the rows of the selected species, or a vector of names of the selected species.

driver.A

numeric vector with driver values. Typically produced by simulateDriver.

driver.B

numeric vector with driver values. Typically produced by simulateDriver. Must have same length as driver.A.

drivers

dataframe with drivers produced by simulateDriverS. It should have the columns:

  • time integer.

  • driver character, values are A and B

  • autocorrelation.length numeric, values are 200, 600, and 1800.

  • value numeric, value of the driver for the given time.

burnin

boolean, generates a warming-up period for the population model of a length of five times the maximum age of the virtual taxa.

Details

The model starts with a population of 100 individuals with random ages, in the range [1, maximum age], taken from a uniform distribution (all ages are equiprobable). For each environmental suitability value, including the burn-in period, the model performs the following operations:

The model returns a table with climatic suitability, pollen production, and population size (reproductive individuals only) per simulation year. Figure 10 shows the results of the population model when applied to the example virtual species.

Value

A list of dataframes, each one of them with the results of one simulation. The dataset simulation exemplifies the output of this function. Each dataframe in the output list has the columns:

Author(s)

Blas M. Benito <blasbenito@gmail.com>

See Also

parametersDataframe, fixParametersTypes, plotSimulation

Examples


#getting data
data(parameters)
data(driverA)

#simulating population dynamics
# of first taxon in parameters
# for first 500 values of driverA
sim.output <- simulatePopulation(
 parameters=parameters[1,],
 driver.A=driverA[1:500]
 )

#checking output
str(sim.output)


[Package virtualPollen version 1.0.1 Index]