dGammaSD: Compute gamma stage duration densities.

Description Usage Arguments Value Examples

View source: R/functions.r

Description

The function is intended to be used in the calculation of numeric likelihoods.

Usage

1
dGammaSD(mu, cv, nGrid, tMax)

Arguments

mu

A vector of length equal to one minus the number of stages giving the mean stage durations for all but the last stage.

cv

A vector of the same length as mu giving the coefficient of variation, which is equal to one over the square root of the shape, for all but the last stage.

nGrid

The number of grid points to use.

tMax

The maximum time point in the grid (i.e. the right endpoint).

Value

A matrix of stage duration probabilities where the first column gives the grid and the remaining columns give the stage duration probabilities.

Examples

1
2
## Simulate gamma stage durations for ten individuals.
dGammaSD(mu = c(5,2,4), cv = c(1,.5,.3), nGrid = 20, tMax = 15)

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