Learn R Programming

fishmethods (version 1.10-4)

vblrt: Likelihood Ratio Tests for Comparing Multiple von Bertalanffy Growth Curves

Description

Likelihood ratio tests for comparison of two or more von Bertalanffy growth curves following Kimura (1980).

Usage

vblrt(len = NULL, age = NULL, group = NULL, error = 1,
 select = 1, Linf = c(NULL), K = c(NULL), t0 = c(NULL),plottype=0,
control=list(maxiter=10000,minFactor=1/1024,tol=1e-5))

Arguments

len

the vector of lengths of individual fish.

age

the vector of ages associated with the length vector.

group

the vector of character names specifying group association. The first character in the name must be a letter.

error

the error variance assumption. 1= constant variance for all lijs; 2= constant variance for all mean lengths at age; 3=var of lij varies with age. See methods a-c in Kimura (1980: pp. 766). The required statistics for each type of error are calculated from the individual length-age observations.

select

the selection of starting values of L-infinity, K, and t0. 1=automatic selection, 2=user-specified. If select=1, initial starting values of L-infinity, K, and t0 are calculated from Walford lines (Everhart et al. 1975), and ages represented as decimal values are truncated to the integer before linear regression is applied. If select=2, the user must specify the values of L-infinity, K, and t0.

Linf

if select=2, the starting values of L-infinity of the von Bertalanffy equation for each group.

K

if select=2, the starting values of K of the von Bertalanffy equation for each group.

t0

if select=2, the starting values of t0 of the von Bertalanffy equation for each group.

plottype

the type of plot for each model. 1= observed versus predicted, 2= residuals. Default= 0 (no plot).

control

see function nls.

Value

results

list element with the likelihood ratio tests comparing von Bertalanffy models.

model Ho

list element with the nls fit for the general model.

model H1

list element with the nls for model H1 (Linf1=Linf2=..=Linfn) where n is the number of groups.

model H2

list element with the nls fit for model H2 (K1=K2=..=Kn).

model H3

list element with the nls fit for model H3 (t01=t02=...=t0n).

model H4

list element with the nls fit for model H4 (Linf1=Linf2=..=Linfn, K1=K2=..=Kn, t01=t02=...=t0n).

rss

list element with the residual sum-of-squares from each model.

residuals

list element with the residuals from each model.

Details

Following Kimura (1980), the general model (one L-infinity, K, and t0 for each group) and four sub models are fitted to the length and age data using function nls (nonlinear least squares). For each general model-sub model comparison, likelihood ratios are calculated by using the residual sum-of-squares and are tested against chi-square statistics with the appropriate degrees of freedom. Individual observations of lengths-at-age are required. If error variance assumptions 2 or 3, mean lengths and required statistics are calculated. The parameters are fitted using a model.matrix where the 1st column is a row of 1s representing the parameter estimate of the reference group (lowest alpha-numeric order) and the remaining group columns have 1 if group identifier is the current group and 0 otherwise. The group number depends on the alph-numeric order. See function model.matrix.

To extract the VB parameters for each group under an hypothesis:

x$'model Ho'$coefficients

x$'model H1'$coefficients

x$'model H2'$coefficients

x$'model H3'$coefficients

x$'model H4'$coefficients

where x is the output object.

As an example, let's say three groups were compared.To get the L-infinity estimates for each groups,

Linf1<-x$'model Ho'$coefficients[1]

Linf2<-Linf1+ x$'model Ho'$coefficients[2]

Linf3<-Linf1+ x$'model Ho'$coefficients[3]

For models H1, H2, H3 and H4, the parameter L1 or K1 or t01 will be shared across groups.

References

Everhart, W. H., A. W. Eipper, and W. D. Youngs. 1975. Principles of Fishery Science. Cornell University Press.

Kimura, D. K. 1980. Likelihood methods for the von Bertalanffy growth curve. U. S. Fish. Bull. 77(4): 765-776.

Examples

Run this code
# NOT RUN {
## Normally, the length and age data will represent data for individuals.  
## Kimura's data are mean lengths-at-age but are usable because error=2 
## will calculate mean lengths-at-age from individual data. Since only  
## one value is present for each age,the mean length will be calculated
## as the same value.
data(Kimura)
vblrt(len=Kimura$length,age=Kimura$age,group=Kimura$sex,error=2,select=1,
plottype=2)
# }

Run the code above in your browser using DataLab