getr: Extract log-normal parameters for the prior on intrinsic...

View source: R/getr.R

getrR Documentation

Extract log-normal parameters for the prior on intrinsic growth rate r

Description

When applied to a bdm class object the function uses regular expression matching to extract log-normal distribution parameters for r from the model code.

Usage

getr(object, ...)

## S3 method for class 'bdm'
getr(object, ...)

Arguments

object

an object of the appropriate class

...

additional arguments to generic function

Details

By default the bdm package assumes that the prior on intrinsic growth rate can be described by a log-normal distribution with parameters μ and σ, which correspond to the mean and standard deviation of \ln(r).

Value

A list containing the elements 'E[log(r)]' (equal to μ), 'SD[log(r)]' (equal to σ), 'E[r]', 'VAR[r]' and 'CV[r]'.

Examples

# default model
mdl <- bdm()

# extract r from
# bdm object
getr(mdl)


cttedwards/bdm documentation built on Oct. 11, 2022, 7:52 p.m.