Learn R Programming

fishmethods (version 1.3-0)

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

Description

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

Usage

vblrt(len = NULL, age = NULL, group = NULL, error = 1,
 select = 1, Linf = NULL, K = NULL, t0 = NULL,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 or numeric codes specifying group association.
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 err
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 Walf
Linf
if select=2, the starting value for L-infinity of the von Bertalanffy equation.
K
if select=2, the starting value for K of the von Bertalanffy equation.
t0
if select=2, the starting value for t0 of the von Bertalanffy equation.
control
see function nls.

Value

  • resultslist element with the likelihood ratio tests comparing von Bertalanffy models.
  • model Holist element with the nls fit for the general model.
  • model H1list element with the nls for model H1 (Linf1=Linf2).
  • model H2list element with the nls fit for model H2 (K1=K2).
  • model H3list element with the nls fit for model H3 (t01=t02).
  • model H4list element with the nls fit for model H4 (Linf1=Linf2, K1=K2, t01=t02).
  • rsslist element with the residual sum-of-squares from each model.
  • residualslist element with the residuals from each model.

Details

Following Kimura (1980), the general model (6 parameters; 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. A dummy vector called cat, containing 0s for the first group with lower alpha-numeric order and 1s for the second group, is used in the estimation of group parameters.

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
## 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)

Run the code above in your browser using DataLab