clus.vb.fit: Fit a Von Bertalanffy growth equation to clustered data via...

Description Usage Arguments Details Value Author(s) Examples

View source: R/clus.vb.fit.R

Description

Fits the von Bertalanffy growth equation to clustered length and age by using nonlinear least-squares and by bootstrapping clusters

Usage

1
2
3
clus.vb.fit(len=NULL,age=NULL,cluster=NULL,nboot=1000,
                    control=list(maxiter=10000,
                    minFactor=1/1024,tol=1e-5))

Arguments

len

vector of lengths of individual fish

age

vector of ages of individual fish

cluster

haul or cluster membership identifier

nboot

number of bootstrap samples

control

see control under function nls.

Details

A standard von Bertalanffy growth curve is fitted to length-at-age data of each nboot sample of clusters using nonlinear least-squares (function nls). The estimated parameters and their associated standard deviations are calculated as the mean and variance of the estimates from all bootstrap fits. The average parameter correlation matrix from all bootstrap fits is provided as well.

Value

List containing a summary of successful model fits and parameter estimates, standard deviation and 95 percent confidence intervals, and the average correlation matrix.

Author(s)

Gary A. Nelson, Massachusetts Division of Marine Fisheries [email protected]

Examples

1
2
3
4
5
  ## Not run: 
	data(pinfish)
	with(pinfish,clus.vb.fit(len=sl,age=age,cluster=field_no,nboot=100))
  
## End(Not run)

Example output

Loading required package: MASS
Loading required package: boot
Loading required package: bootstrap
Loading required package: lme4
Loading required package: Matrix
Loading required package: numDeriv
$summary
[1] "Parameter coefficients based on  100  successful fits"

$results
     Estimate      SE  95% LCI  95% UCI
Linf  217.010 39.4670 169.8160 310.8150
K       0.430  0.1715   0.1624   0.8120
t0     -0.875  0.4045  -1.8771  -0.2362

$correlations
       Linf      K     t0
Linf  1.000 -0.941 -0.790
K    -0.941  1.000  0.939
t0   -0.790  0.939  1.000

fishmethods documentation built on Nov. 17, 2017, 7:43 a.m.