rick.stoch: stochastic Ricker model for simulating population growth in a...

View source: R/ricker.R

rick.stochR Documentation

stochastic Ricker model for simulating population growth in a community.

Description

This function generates stochastic population abundances for a nSpp species.

Usage

rick.stoch(nSpp, tMax, r, N, K, sd)

Arguments

nSpp

The number of species to be simulated

tMax

The number of time steps to include in the simulation

r

Vector (length nSpp) of the average intrinsic growth rate for each species

N

Matrix (nrow=tMax, ncol=nSpp) to store abundances; N[1,] must be initialized

K

Vector (length nSpp) of the carrying capacity for each species

sd

Vector (length nSpp) of the standard deviation in annual growth rate for each species

Value

Updated matrix N with simulated abundances

Examples

nSpp <- 3; tMax <- 20
r <- runif(3, 0.75, 1.25)
sd <- runif(3, 0.001, 2)
K <- runif(3, 100, 200)
N <- matrix(nrow=tMax, ncol=nSpp)
N[1,] <- K
N <- rick.stoch(nSpp, tMax, r, N, K, sd)


Sz-Tim/sevcheck documentation built on Feb. 1, 2024, 12:39 a.m.