The von Bertalanffy Growth Function (VBGF) was introduced and methods for fitting the function were illustrated in Chapter 12 of the *Introductory Fisheries Analyses with R* (IFAR) book. Mean length-at-age has been modeled by functions other than the VBGF. Common other functions are the exponential, logistic, and polynomial (Ricker 1975), as well as the specific functions of Gompertz (1825), Richards (1959), Schnute (1981), and Richards (1959).

Several of these functions are used in this supplement to demonstrate how to fit growth functions other than the VBGF. Other supplements demonstrate how to fit other parameterizations of the VBGF and use alternative nonlinear model fitting algorithms.

### Required Packages for this Supplement

Functions used in this supplement require the packages shown below.

```
> library(FSA)
> library(dplyr)
> library(nlstools)
> library(AICcmodavg)
```

### Data Used in this Supplement

The male Black Drum (view, download, meta-data) data used in the IFAR book will also be used in this supplement.

```
> bdmf <- read.csv("BlackDrum2001.csv") %>%
select(-c(spname,day,weight)) %>%
filterD(sex %in% c("male","female"),otoage<50)
> bdm <- filterD(bdmf,sex=="male")
> headtail(bdm)
```

```
year agid month tl sex otoage
1 2001 1 4 787.5 male 6
2 2001 2 5 700.0 male 5
3 2001 8 5 1140.0 male 23
72 2001 122 5 1175.0 male 39
73 2001 125 6 590.0 male 4
74 2001 127 6 530.0 male 3
```

## Fitting Other Growth Functions

The “Schnute” model and several parameterizations of the logistic, Gompertz, and Richards models have been coded in convenience functions in `FSA`

. For example, the default parameterizations of the logistic, Gompertz, and Richards models are defined below.

```
> l1 <- logisticFuns()
> g1 <- GompertzFuns()
> r1 <- RichardsFuns()
```

Unfortunately, convenience functions for finding starting values for each of these functions do not exist. Starting values may be obtained by iteratively superimposing a curve of the function at chosen values for the parameters onto a scatterplot of the raw data. This process may take considerable trial-and-error to find parameter values that provide a curve in the “neighborhood” of the data. Starting values likely only need to provide a rough fit to the data.

The code below demonstrates this process for the Richards function created above in `r1()`

. Note that the Richards function has four parameters – \(L_{\infty}\), \(k\), \(a\), and \(b\). Further note that I had considerable difficult finding starting values that would work with the Richards function for these data.

```
> plot(tl~otoage,data=bdm,pch=19,col=rgb(0,0,0,1/4),
xlab="Otolith Age",ylab="Total Length (mm)")
> svR1 <- list(Linf=1200,k=0.1,a=1.1,b=0.4)
> curve(r1(x,unlist(svR1)),from=3,to=42,add=TRUE,lwd=2)
```

Figure 1: Richards growth function evaluated at potential starting values superimposed on the length-at-age data for male Black Drum.

A similar process (not shown) was followed for the logistic and Gompertz models.

```
> svG1 <- list(Linf=1250,gi=0.15,ti=2)
> svL1 <- list(Linf=1250,gninf=0.15,ti=4)
```

These models may be fit and summarized as illustrated in the **IFAR** book. The code below is for the Richards function.

```
> fitR1 <- nls(tl~r1(otoage,Linf,k,a,b),data=bdm,start=svR1)
> bootR1 <- nlsBoot(fitR1)
```

```
Warning in nlsBoot(fitR1): The fit did not converge 97 times during
bootstrapping
```

`> cbind(Ests=coef(fitR1),confint(bootR1))`

```
Ests 95% LCI 95% UCI
Linf 1.216988e+03 1188.7345431 1249.8129807
k 9.419418e-02 0.0670484 0.1445181
a 1.155605e+00 0.7394841 1.2185166
b 3.793338e-01 0.2757284 1.0795204
```

`> predict(bootR1,r1,t=3)`

```
prediction 95% LCI 95% UCI
559.9915 518.7943 599.4339
```

Information criterion may be used to identify which of these models best fits the male Black Drum data. First, the von Bertalanffy (as fit in the **IFAR** book), Gompertz, and logistic functions are fit to the data.

```
> vbTyp <- vbFuns()
> svTyp <- list(Linf=1193,K=0.13,t0=-2.0)
> fitTyp <- nls(tl~vbTyp(otoage,Linf,K,t0),data=bdm,start=svTyp)
> fitG1 <- nls(tl~g1(otoage,Linf,gi,ti),data=bdm,start=svG1)
> fitL1 <- nls(tl~l1(otoage,Linf,gninf,ti),data=bdm,start=svL1)
```

These objects are then submitted to `AICctab`

to provide a summary table. From this, the Richards models is most supported followed by the VBGF. The logistic and Gompertz models had little support, likely because they force an inflection point in the model which is not apparent in these data.

`> aictab(list(fitTyp,fitL1,fitG1,fitR1),c("VBGF","logistic","Gompertz","Richards"))`

```
Model selection based on AICc :
K AICc Delta_AICc AICcWt Cum.Wt LL
Richards 5 779.60 0.00 0.63 0.63 -384.36
VBGF 4 780.85 1.25 0.34 0.96 -386.14
Gompertz 4 785.34 5.74 0.04 1.00 -388.38
logistic 4 790.33 10.73 0.00 1.00 -390.88
```

A plot of the best-fit model for each growth function (Figure 2) shows, however, that there is likely very little difference in predicted values among the four models.

```
> plot(tl~otoage,data=bdm,pch=19,col=rgb(0,0,0,1/4),
xlab="Otolith Age",ylab="Total Length (mm)")
> curve(vbTyp(x,coef(fitTyp)),from=3,to=42,add=TRUE,lwd=6)
> curve(r1(x,coef(fitR1)),from=3,to=42,add=TRUE,lwd=4,col="blue")
> curve(g1(x,coef(fitG1)),from=3,to=42,add=TRUE,lwd=2,col="red")
> curve(l1(x,coef(fitL1)),from=3,to=42,add=TRUE,col="orange")
```

Figure 2: Fitted models for the von Bertalanffy (black), Richards (blue), Gompertz (red), and logistic (orange) growth functions fit to the male Black Drum data.

## Reproducibility Information

**Compiled Date:**Fri Nov 06 2015**Compiled Time:**9:26:01 AM**R Version:**R version 3.2.2 (2015-08-14)**System:**Windows, i386-w64-mingw32/i386 (32-bit)**Base Packages:**base, datasets, graphics, grDevices, methods, stats, utils**Required Packages:**FSA, dplyr, nlstools, AICcmodavg, captioner, knitr and their dependencies (assertthat, car, DBI, digest, evaluate, formatR, gdata, gplots, graphics, grDevices, highr, Hmisc, lattice, lazyeval, magrittr, markdown, MASS, Matrix, methods, nlme, plotrix, plyr, R6, Rcpp, sciplot, stats, stats4, stringr, tools, unmarked, utils, VGAM, xtable, yaml)**Other Packages:**AICcmodavg_2.0-3, captioner_2.2.3, dplyr_0.4.3, extrafont_0.17, FSA_0.8.4, knitr_1.11, nlstools_1.0-2**Loaded-Only Packages:**assertthat_0.1, DBI_0.3.1, digest_0.6.8, evaluate_0.8, extrafontdb_1.0, formatR_1.2.1, gdata_2.17.0, grid_3.2.2, gtools_3.5.0, htmltools_0.2.6, lattice_0.20-33, lazyeval_0.1.10, magrittr_1.5, MASS_7.3-44, Matrix_1.2-2, nlme_3.1-122, parallel_3.2.2, plyr_1.8.3, R6_2.1.1, raster_2.4-20, Rcpp_0.12.1, reshape_0.8.5, rmarkdown_0.8.1, Rttf2pt1_1.3.3, sp_1.2-1, splines_3.2.2, stats4_3.2.2, stringi_1.0-1, stringr_1.0.0, tools_3.2.2, unmarked_0.11-0, VGAM_1.0-0, xtable_1.7-4, yaml_2.1.13**Links:**Script / RMarkdown

## References

Gompertz, B. 1825. On the nature of the function expressive of the law of human mortality and on a new mode of determining the value of life contingencies. Philosophical Transactions of the Royal Society of London 115:515–585.

Richards, F. 1959. A flexible growth function for empirical use. Journal of Experimental Botany 10:290–300.

Ricker, W. E. 1975. Computation and interpretation of biological statistics of fish populations. Bulletin of the Fisheries Research Board of Canada.

Schnute, J. 1981. A versatile growth model with statistically stable parameters. Canadian Journal of Fisheries and Aquatic Sciences 38:1128–1140.