Fits three growth models to length and weight-at-age data.
growth(intype=1,unit=1,size=NULL,age=NULL,calctype=1,wgtby=1,se2=NULL,error=1,
specwgt=0.0001,Sinf=NULL,K=NULL,t0=NULL,B=3,graph=TRUE,
control=list(maxiter=10000,minFactor=1/1024,tol=1e-5))
List containing list elements of the equation/structure and nls output for each model. Information from nls output can be extracted using standard functions (e.g., summary()).
the input format: 1= individual size data; 2 = mean size data. Default intype=1.
the size unit: 1= length; 2 = weight. Default unit=1.
the vector of size (length or weight) data.
the vector of ages associated with the size vector.
if intype=1, 1 = use individual size data; 2 = calculate mean size from individual size data. Default calctype=1.
weighting scheme: 1 = no weighting; 2 = weight means by inverse variance. Weighting of individual data points is not allowed. Default wgtby=1.
if intype=2 and wgtby=2, specify vector of variances (SE^2) associated with mean size-at-age data.
the error structure: 1 = additive; 2 = multiplicative. Default error=1.
if intype=1 and wgtby=2, the weight value to use for cases where var=0 or only one individual is available at a given age.
the starting value for L-infinity or W-infinity of the growth models. Required.
the starting value for K of the growth models.
the starting value for t0 of the growth models.
the length-weight equation exponent used in the von Bertalanffy growth model for weight. Default B=3.
logical value specifying if fit and residual plots should be drawn. Default graph = TRUE.
see function nls.
Gary A. Nelson, Massachusetts Division of Marine Fisheries gary.nelson@mass.gov
Three growth models (von Bertalanffy, Gompert and logistic) are fitted to length- or weight-at-age data using nonlinear least-squares (function nls). If individual data are provided, mean size data can be calculated by specifying calctype=2. When fitting mean size data, observations can be weighted by the inverse sample variance(wgtby=2), resulting in weighted nonlinear least squares. Additive or multiplicative error structures are specified via error. See page 135 in Quinn and Deriso (1999) for more information on error structures.
If unit is weight, the exponent for the von Bertalanffy growth in weight model is not estimated and must be specified (B).
Plots of model fit and residuals are generated unless graph=FALSE.
Quinn, T. J. and R. B. Deriso. 1999. Quantitative fish dynamics. Oxford University Press. 542 pages.
data(pinfish)
growth(intype=1,unit=1,size=pinfish$sl,age=pinfish$age,
calctype=1,wgtby=1,error=1,Sinf=200,K=0.3,t0=-1)
Run the code above in your browser using DataLab