simMNCohort: Simulate stage frequency data with known initial number of...

Description Usage Arguments Value Examples

View source: R/functions.r

Description

Simulate stage frequency data with known initial number of individuals for each sampling occasion.

Usage

1
simMNCohort(sampleTimes, N0, rStageDur, mortRate, Narg, ...)

Arguments

sampleTimes

Vector of times at which the cohort is sampled. Development is assumed to start at time 0.

N0

An integer vector of length equal to the length of sampleTimes, or of length one, giving the known number of individuals at the start of development. If the length is one, the value is taken as the number initial individuals for eac sampling time.

rStageDur

A function simulating stage durations, and returning stage durations as a matrix where rows represent individuals and columns represent stage durations for each stage. The function should have an argument for the number of individuals to simulate.

mortRate

A vector of mortality rates for each stage.

Narg

The name of the argument to the function rStageDur which determines the number of individuals that are simulated.

...

Further arguments passed to rStageDur.

Value

An sfData object.

Examples

1
2
data = simMNCohort(seq(1,50, length.out=15), N0 = 30, rGammaSD, mu = c(5, 15, 8), cv = c(.5,.5,.5),
                   mortRate = c(0.01, 0.01,0.01,0.01), Narg = "N")

jknape/stageFreq documentation built on May 19, 2019, 11:42 a.m.