mobw.kg: Mean body weight per month

Description Usage Arguments Details Value Author(s) Examples

Description

Using a data.frame with paired observations of length and weight of individuals, and a second data.frame with paired observations of length and month of individuals, predict the mean weight per month in kg and its standard error.

Usage

1
mobw.kg(par, lenw, lenm, method, span)

Arguments

par

Numeric vector length 2 with the initial values for parameters of the length-weight relationship.

lenw

Numeric data.frame with paired observations of length and weight (kg).

lenm

Numeric data.frame with paired observations of length and month in numeric format.

method

Character, the numerical method to fit the length-weight relationship. Use one of the following: BFGS,CG,Nelder-Mead,SANN.

span

The span parameter of the loess function to fit the length-month relationship.

Details

The length data in lenw and lenm must be in the same units.

Value

A data.frame with five columns: month, predicted mean weight from the length data and the length-weight relationship, its standard error, smoothed mean length from the loess fit of the length-month relationship, and its standard error.

Author(s)

Ruben H. Roa-Ureta (ORCID ID 0000-0002-9620-5224)

Examples

1
2
3
4
5
6
7
data(gayhakelm)
data(gayhakelw)
par <-  c(4e-4,2.9)
method <- "SANN"
span   <- 1
chihake.mobw <- mobw.kg(par=par, lenw=gayhakelw, lenm=gayhakelm,
                        method=method, span=span)

Example output

--------------------------------------------------------------
 Fishery Stock Assessment by Catch Dynamics Models
 CatDyn version 1.1-1 (built on 2018-12-18) is now loaded
--------------------------------------------------------------

CatDyn documentation built on May 2, 2019, 4:21 a.m.