Introduction

This vignette demonstrates how to back-calculate lengths at previous ages from radial measurements made on calcified structures of fish. This vignette assumes that you have an understanding of

Packages used in this vignette are loaded below.

library(RFishBC)   # for bcFuns()
library(FSA)       # for validn(), sumTable()
library(dplyr)     # for %>%, inner_join(), arrange(), group_by, summarize()

Finally, some of the data manipulations used in this vignette, which may not be familiar to all readers, are described in detail in Ogle (2016).

Data for Back-Calculation

The radial measurements from multiple fish should be combined into one data.frame using combineData(). In addition, the length-at-capture for each fish should be appended to that data.frame. A method to combine radial measurements from multiple fish and append a length-at-capture variable was demonstrated in the Output Data File section of the Collecting Radii Data vignette.

Several of the back-calculation methods require estimating parameters from the relationship between fish length and structure radius or structure radius and fish length (as described in Short Introduction to Back-calculation vignette). These methods cannot be demonstrated well with a small number of fish (as in the Collecting Radii Data vignette). Thus, data from a large number of Smallmouth Bass (Micropterus dolomieu) collected from West Bearskin Lake (MN) in 1990 will be used in this vignette.

A data.frame of the Smallmouth Bass data as it would appear from combineData() is obtained as follows.1

data(SMBassWB2,package="RFishBC")
#> 1 482     DHO      1 1.51076 1.51076      NA   NA   NA   NA   NA   NA   NA
#> 2 768     DHO      1 1.57989 1.57989      NA   NA   NA   NA   NA   NA   NA
#> 3 428     DHO      1 1.48721 1.48721      NA   NA   NA   NA   NA   NA   NA
#> 4 478     DHO      2 2.73596 1.60554 2.73596   NA   NA   NA   NA   NA   NA
#> 5 379     DHO      2 3.05503 1.59628 3.05503   NA   NA   NA   NA   NA   NA
#> 6 477     DHO      2 2.44914 1.32061 2.44914   NA   NA   NA   NA   NA   NA
#> 1   NA
#> 2   NA
#> 3   NA
#> 4   NA
#> 5   NA
#> 6   NA

A data.frame of fish-specific information, most importantly the length-at-capture, is obtained as follows.2

data(SMBassWB1,package="RFishBC")
#>   id species lake gear yearcap lencap
#> 1  5     SMB   WB    E    1988     71
#> 2  3     SMB   WB    E    1988     64
#> 3  2     SMB   WB    E    1988     57
#> 4  4     SMB   WB    E    1988     68
#> 5  6     SMB   WB    E    1988     72
#> 6  7     SMB   WB    E    1988     80

These data can be joined by the common id variable as shown in the Output Data File section of the Collecting Radii Data vignette. The data were also arranged by id to facilitate comparisons throughout this vignette.3

SMBassWB <- inner_join(SMBassWB1,SMBassWB2,by="id") %>%
arrange(id)
#> 1 374     SMB   WB    E    1990    243     DHO      7 7.57375 1.01672
#> 2 375     SMB   WB    E    1990    293     DHO      7 9.74397 1.76579
#> 3 376     SMB   WB    E    1990    214     DHO      7 5.34522 1.02621
#> 1 2.39296 3.47635 4.37718 5.18976 6.09176 7.57375   NA   NA
#> 2 3.26580 4.35377 5.41608 7.14118 8.79697 9.74397   NA   NA
#> 3 1.93058 2.58000 3.24923 4.05444 4.73920 5.34522   NA   NA
tail(SMBassWB,n=3)
#> 179 767     SMB   WB    E    1990     99     DHO      2 2.34205 1.44159
#> 180 768     SMB   WB    E    1990     75     DHO      1 1.57989 1.57989
#> 181 998     SMB   WB    E    1990    298     DHO      7 8.54805 1.37828
#> 179 2.34205      NA      NA      NA     NA      NA   NA   NA
#> 180      NA      NA      NA      NA     NA      NA   NA   NA
#> 181 2.70647 3.60701 4.48222 5.17646 6.6224 8.54805   NA   NA

Note that the variables in this data frame are defined as follows:4

• id: A fish’s unique identification number.
• species: Species of fish.
• lake: Lake where fish was collected.
• gear: Gear used to collect the fish.
• yearcap: Year that the fish was captured.
• lencap: Fish length at the time of capture.
• agecap: Fish age at the time of capture.
• radX: A radial measurement to the “X”th annulus. Note the many “NA” values to annuli that were larger than the age-at-capture.

Computing Back-Calculated Lengths

A data.frame of back-calculated lengths ($$L_{i}$$) can be constructed from a data.frame that contains at least the length-at-capture ($$L_{cap}$$), structure radius-at-capture ($$R_{cap}$$), and the structure radius at each annulus ($$R_{i}$$) with backCalc().

The first argument to this function is a data.frame with the $$L_{cap}$$, $$R_{cap}$$, and $$R_{i}$$ data in either “long” or “wide” format. A long-format data.frame MUST have the following variable names:

• id: Unique fish identification variable.
• agecap: The fish’s age at capture.
• ann: The annulus number.
• rad: The structure radius (at an annulus).
• radcap: The total structure radius at the time of capture.

A wide-format data.frame MUST have the following variable names:

• id: Unique fish identification variable.
• agecap: The fish’s age at capture.
• radcap: The total structure radius at the time of capture.
• radX: Multiple variables that contain the structure radius to the Xth annulus.

These data.frames will be in these required formats if the data originated from the combineData() function.5 Other variables may exist in the data.frame, but these variables must exist with the names and contents shown here.

The data.frame MUST also have a variable that contains the fish’s length-at-capture. The name for this variable MUST be given (without quotes) in the second or lencap= argument.

The format for the input data.frame MUST be given in inFormat=. The two choices for this argument are "long" and "wide".

Finally, one of the many back-calculation models discussed in Vigliola and Meekan (2009) must be selected for use with the BCM= argument. The back-calculation model can be chosen by “name” or number, both of which can be seen in the documentation for bcFuns(). For example, the popular Fraser-Lee model can be selected with BCM="FRALE" or BCM=2.

Some of the models require parameters estimated from models fit to the relationship between fish length and structure radius or structure radius and fish length. These models will be fit “behind-the-scenes” in backCalc(). However, some models also require parameters estimated without the observed data, which must then be provided by the user. For example, the Fraser-Lee model uses a length correction factor that may be the estimated length when the structure first forms or a standard published value for a species (Carlander 1980). If the user wants to provide one of these values, then it is given in the a= argument.6 Other parameters for other models may be given in other arguments to backCalc() (see the documentation for backCalc()).

The results of backCalc() can be returned in either “long” or “wide” format as identified with outFormat= (which defaults to be the same as inFormat=). The number of digits for the back-calculated lengths may be controlled with digits=.

For example, back-calculated lengths were constructed from the wide-format data in SMBassWB, which has length-at-capture data in the lencap variable, using the Fraser-Lee model (with the “a” parameter estimated from the data) with the code below. The lengths were rounded to whole numbers (i.e., digits=0) and the results were returned in wide-format (the same as the input format).

SMBassWB_FL <- backCalc(SMBassWB,lencap,BCM="FRALE",inFormat="wide",digits=0)
#> <U+2714> Using the Fraser-Lee model with a=41.6516606795388.
#>    id species lake gear yearcap lencap reading agecap len1 len2 len3 len4
#> 1 374     SMB   WB    E    1990    243     DHO      7   69  105  134  158
#> 2 375     SMB   WB    E    1990    293     DHO      7   87  126  154  181
#> 3 376     SMB   WB    E    1990    214     DHO      7   75  104  125  146
#>   len5 len6 len7 len8 len9
#> 1  180  204  243   NA   NA
#> 2  226  269  293   NA   NA
#> 3  172  194  214   NA   NA
tail(SMBassWB_FL,n=3)
#>      id species lake gear yearcap lencap reading agecap len1 len2 len3
#> 179 767     SMB   WB    E    1990     99     DHO      2   77   99   NA
#> 180 768     SMB   WB    E    1990     75     DHO      1   75   NA   NA
#> 181 998     SMB   WB    E    1990    298     DHO      7   83  123  150
#>     len4 len5 len6 len7 len8 len9
#> 179   NA   NA   NA   NA   NA   NA
#> 180   NA   NA   NA   NA   NA   NA
#> 181  176  197  240  298   NA   NA

The example below uses the same data and same back-calculation model, but with the results returned in long-format which is more conducive to statistical summarization and modeling.

SMBassWB_FL2 <- backCalc(SMBassWB,lencap,BCM="FRALE",
inFormat="wide",outFormat="long",digits=0)
#> <U+2714> Using the Fraser-Lee model with a=41.6516606795388.
#>      id species lake gear yearcap lencap reading agecap ann bclen
#> 1   374     SMB   WB    E    1990    243     DHO      7   1    69
#> 182 374     SMB   WB    E    1990    243     DHO      7   2   105
#> 363 374     SMB   WB    E    1990    243     DHO      7   3   134
#> 544 374     SMB   WB    E    1990    243     DHO      7   4   158
#> 725 374     SMB   WB    E    1990    243     DHO      7   5   180
#> 906 374     SMB   WB    E    1990    243     DHO      7   6   204
tail(SMBassWB_FL2,n=6)
#>       id species lake gear yearcap lencap reading agecap ann bclen
#> 362  998     SMB   WB    E    1990    298     DHO      7   2   123
#> 543  998     SMB   WB    E    1990    298     DHO      7   3   150
#> 724  998     SMB   WB    E    1990    298     DHO      7   4   176
#> 905  998     SMB   WB    E    1990    298     DHO      7   5   197
#> 1086 998     SMB   WB    E    1990    298     DHO      7   6   240
#> 1267 998     SMB   WB    E    1990    298     DHO      7   7   298

Summarizing Back-Calculated Lengths

For example, the mean back-calculated length-at-age may be computed with group_by() and summarize() as shown below for the long-format Fraser-Lee results.

tmp <- SMBassWB_FL2 %>%
group_by(ann) %>%
summarize(n=validn(bclen),
mn=round(mean(bclen),0),
sd=round(sd(bclen),1)) %>%
as.data.frame()
tmp
#>   ann   n  mn   sd
#> 1   1 181  79  6.5
#> 2   2 178 114 10.5
#> 3   3 155 147 13.9
#> 4   4  71 173 15.3
#> 5   5  64 201 17.5
#> 6   6  64 235 23.3
#> 7   7  50 269 25.3
#> 8   8   2 283 26.9
#> 9   9   2 314 20.5

Additionally, the mean length at each back-calculated age computed separately for each age-at-capture is found with sumTable(), where the left side of the formula is the quantitative variable to be summarized and the right side has grouping variables presented in row*column format.

sumTable(bclen~agecap*ann,data=SMBassWB_FL2,digits=0)
#>    1   2   3   4   5   6   7   8   9
#> 1 74  NA  NA  NA  NA  NA  NA  NA  NA
#> 2 80 113  NA  NA  NA  NA  NA  NA  NA
#> 3 77 113 149  NA  NA  NA  NA  NA  NA
#> 4 71 122 161 194  NA  NA  NA  NA  NA
#> 6 80 108 136 169 199 230  NA  NA  NA
#> 7 82 118 145 171 202 237 269  NA  NA
#> 9 72 100 135 166 198 236 256 283 314

References

• Carlander, K.D. 1982. Standard intercepts for calculating lengths from scale measurements for some centrarchid and percid fishes. Transactions of the American Fisheries Society 111:332–336. Abstract

• Ogle, D.H. 2016. Introductory Fisheries Analyses with R. CRC Press/Chapman & Hall. Webpage

• Vigliola, L., and M.G. Meekan. 2009. The back-calculation of fish growth from otoliths. Pages 174-211 in Green, B., B. Mapstone, G. Carlos, and G. Begg, editors. Tropical fish otoliths: information for assessment, management and ecology, volume 11. Springer, Dordrecht, Netherlands. Full Text

Footnotes

1. Both of these data.frames are available in the RFishBC package. However, these types of data could be the result of using comineData() and inner_join() or from loading a relevant CSV file as demonstrated in Output Data File section of the Collecting Radii Data vignette.

2. Note that this file contains information from fish captured in years other than 1990.

3. Arranging the data by fish id is not required for the work below. It is simply used here for demonstration purposes.

4. The species, lake, gear, yearcap, and reading variables are not needed in this vignette, but could be needed in further statistical analyses.

5. If your data originated from somewhere else, then you may need to rename your variables to meet these conventions.

6. If a is not provided by the user for the Fraser-Lee model, then it will be estimated from the intercepts of the linear regression of fish length on structure radius.