getlogK: Extract an initial value for the carrying capacity

View source: R/getlogK.R

getlogKR Documentation

Extract an initial value for the carrying capacity

Description

This function can be applied to a list or bdmData object to provide a rough estimate of ln(K).

Usage

getlogK(object, ...)

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

## S3 method for class 'list'
getlogK(object, r, interval, ...)

Arguments

object

either a bdm class object or a list object containing the elements index (an array) and harvest (a vector)

...

additional arguments to generic function

r

an assumed value for the intrinsic growth rate r

Details

This function assumes a logistic production function and applies a grid search over ln(K) = (3, 30) using a least-squares measure of fit. The value for intrinsic growth must be provided as an input and would usually be obtained through a call to rCalc in the lhm package.

Examples

# get some data
data(albio)
dat <- bdmData(harvest = albio$catch, index = albio$cpue, time = rownames(albio))

# default model
mdl <- bdm()

# extract logK from
# bdm object
getlogK(mdl)

# extract with data
mdl@data <- dat
getlogK(mdl)

# calculate logK from
# catches and assumed r
getlogK(dat, r = exp(-1))


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