sim_generation: Simulate a generation

Description Usage Arguments Value

View source: R/sim.R

Description

Simulates the survival and reproduction of a population over a generation.

Usage

1
sim_generation(pop_tpd, tseq, spsp, rpsp, cmtx, mu, sdm, pmin, samples, error)

Arguments

pop_tpd

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

tseq

A sequence of temperature values generated by the sim_gen_tseq function

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 the new generation of individuals.


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