simulation: Simulation

Description Usage Arguments Value

View source: R/sim.R

Description

Simulates the evolution of a population based on thermal conditions

Usage

1
simulation(pop_tpd, tseqs, spsp, rpsp, cmtx, mu, sdm, pmin, samples, error)

Arguments

pop_tpd

The thermal-performance dataset (TPD) of the original population

tseqs

A dataset of temperature values spanning multiple generations in the form of the output of the sim_tseqs function. It's length determines the number of generations.

spsp

Survival probability scaling parameter. Equivalent to the probability of survival at Pmax. Corresponds to the "p" parameter of a binomial distribution of size 1.

rpsp

Reproduction probability scaling parameter. Equivalent to the probability of reproduction at Pmax. Corresponds to the "lambda" parameter of a poisson distribution.

cmtx

A genetic correlations matrix for the TPTs. This parameter is optional and CANNOT INCLUDE Pmin.

sdm

The percentage of the original TPT value that will act as the standard deviation of the normal distribution of mean = 0 from which the amount of change occuring on a mutating trait will be sampled.

pmin

The percentage of Pmax corresponding to Pmin.

samples

The number of samples to be generated for each offspring.

error

The error to be introduced into the offspring's TPD in units of standard deviation of a normal distribution with 0 as mean.

Value

A TPD with the original and all subsequent simulated generations of individuals


ggcostoya/limon documentation built on April 27, 2021, 10:09 p.m.