Adult Index Estimation

Jean V. Adams

2018-08-12

The R package GLFC includes functions to estimate indices of adult sea lamprey abundance in the Great Lakes. The Great Lakes Fishery Commission made the decision to switch to a lake-wide index of adult abundance in December 2014 (GLFC-TTF 2014). Prior to that decision, lake-wide population estimates (PE) were generated following Mullett et al. (2003). This vignette walks you through the process of generating Adult Index estimates.

One overarching function, AIpresto can be used to carry out all the steps of the Adult Index estimation process in one fell swoop. This function prepares and error checks the data, estimates the Adult Index, calculates the targets, and generates a draft report.

Install

Install the latest version of R from CRAN.

Install the latest version of the GLFC package following the instructions at Readme. The easiest way to do this, if you already have the package devtools installed, is:

devtools::install_github("JVAdams/GLFC")

Prepare the data

Three csv files are needed to generate Adult Index estimates, one each with new stream data, previous stream data, and previous lake data.

(1) STREAMDATANEW should contain stream mark-recapture estimates of adult sea lampreys for the year of interest.

year lake lscode trapcatch PEmr CVmr comments
2015 1 1.032 1 NA NA no recaps
2015 2 2.005 5971 9121 6
2015 2 2.006 575 910 16
2015 2 2.015 619 1548 9
2015 2 2.024 1010 1316 12

The first row of STREAMDATANEW should be a header row with the following column names:

where \[ CV_{mr} = 100\% \frac{\sqrt{Var(PE_{mr})}}{PE_{mr}} \]

(2) STREAMDATAPREV should contain stream mark-recapture estimates of adult sea lampreys for all of the years prior to the year of interest.

year lake lscode PEmr CVmr indexContrib indexContribCV
2000 1 1.026 NA NA NA NA
2001 1 1.026 NA NA NA NA
1989 1 1.028 NA NA NA NA
1990 1 1.028 NA NA NA NA
1991 1 1.028 NA NA NA NA

The first row of STREAMDATAPREV should be a header row with the following column names:

(3) LAKEDATAPREV should contain annual lake-wide adult sea lamprey indices for all of the years prior to the year of interest.

year lake index ilo ihi
2010 5 14864 11176 18552
2011 5 24808 15232 34384
2012 5 25848 21379 30318
2013 5 9456 7532 11380
2014 5 10644 8435 12854

The first row of LAKEDATAPREV should be a header row with the following column names:

For all 3 files,

All 3 files should all be stored in a single directory, DIRECTORY.

Assign the name of the directory (use double backslashes, \\, in the file path) and the names of the three files. For example,

Dir <- "C:\\temp"
StreamNew <- "AdultStream2015.csv"
StreamPrev <- "AdultStreamThru2014.csv"
LakePrev <- "AdultLakeThru2014.csv"

Run the works

Load the GLFC package to have access to the Adult Index functions.

library(GLFC)

Use the AIpresto() function to prepare and error check the data, estimate the Adult Index, calculate the targets, and generate a draft report. Simply provide the function with the name of the directory where the files are stored, the names of the new and previous stream data, and the name of the previous lake data.

AIpresto(DIRECTORY=Dir, NEWDATARAW=StreamNew, STREAMDATAPREV=StreamPrev, LAKEDATAPREV=LakePrev)

Behind the scenes

Within the AIpresto() function, the following steps are carried out.

Manipulate the data

The AIprep() function is used to read in the adult sea lamprey stream trapping data and prepare them for error checking and estimation.

The AIprep() function brings in additional information built in to the GLFC package by default, including

lake lscode country strcode estr strname lat long
1 1.060 Canada 60 4 Little Carp 46.50 -84.43
1 1.059 Canada 59 5 Big Carp 46.50 -84.45
1 1.072 Canada 72 23 Cranberry 46.70 -84.43
1 1.058 Canada 58 24 Goulais 46.71 -84.45
1 1.071 Canada 71 39 Harmony 46.85 -84.36
lake index.streams
Superior 1.001, 1.002, 1.009, 1.029, 1.031, 1.032, 1.062
Michigan 2.005, 2.006, 2.015, 2.024, 2.026, 2.035
Huron 3.01, 3.016, 3.027, 3.032, 3.999, 3.038
Erie 4.001, 4.002, 4.003, 4.007, 4.009
Ontario 5.005, 5.009, 5.022, 5.023, 5.036
lake maintenance.streams
All 1.023, 1.059, 2.013, 2.068, 4.001, 5.013, 5.021

The returned object from the AIprep() function is a single data frame (called streamall in this example) with information from all of the inputs, including new variables:

lscode year trapcatch PEmr CVmr comments index maintain complete indexContrib indexContribCV lake country strcode estr strname lat long
5.036 2010 252 1242 18 NA TRUE FALSE TRUE 1242 18 5 US 36 73 Sterling 43.34 -76.69
5.036 2011 85 703 39 NA TRUE FALSE TRUE 703 39 5 US 36 73 Sterling 43.34 -76.69
5.036 2012 36 NA NA NA TRUE FALSE TRUE 1726 35 5 US 36 73 Sterling 43.34 -76.69
5.036 2013 280 938 18 NA TRUE FALSE TRUE 938 18 5 US 36 73 Sterling 43.34 -76.69
5.036 2014 216 847 31 NA TRUE FALSE TRUE 847 31 5 US 36 73 Sterling 43.34 -76.69

Error checking the data

The AIcheck() function is used to check the data for errors and generate a report of tables and figures.

## New RTF document created, C:\temp/2015 Adult Index - error checking.doc

The generated report is an rtf (rich text format) file but it has a *.doc extension so that it will be automatically opened by Microsoft Word. The report is named YYYY Adult Index - error checking.doc, where YYYY is the latest year represented in streamDat, and placed in the directory csvDir. In this example, the path to the error checking report is C:\temp\2015 Adult Index - error checking.doc.

The following conditions are highlighted as potential errors in the data:

The error checking report also includes two multi-panel (one panel per stream) time series plots:

Estimating the Adult Index

The AIestimate() function is used to estimate the Adult Index of sea lampreys in a single Great Lake. For example, for Lake Ontario,

The annual Adult Index is simply the sum of stream population estimates for each year. Missing stream estimates are estimated by a lake-specific ANOVA model relating the log of the stream estimates to the main effects of each stream and each year, weighted by the inverse of the CV squared.

The 95% confidence interval is estimated from the sum of the mark-recapture variances of the streams.

The returned object from the function (ainewOnt in this example) is a list with 2 components:

lscode year trapcatch PEmr CVmr comments index maintain complete indexContrib indexContribCV lake country strcode estr strname lat long
5.005 2015 233 441 45.35 NA TRUE FALSE TRUE 441 45 5 Canada 5 117 Duffins 43.81 -79.03
5.009 2015 25 NA NA no recaps TRUE FALSE TRUE 893 29 5 Canada 9 131 Bowmanville 43.88 -78.66
5.022 2015 1249 1733 12.51 NA TRUE FALSE TRUE 1733 13 5 Canada 22 100 Humber 43.63 -79.47
5.023 2015 2316 6434 8.00 NA TRUE FALSE TRUE 6434 8 5 US 23 19 Black 43.99 -76.06
5.036 2015 149 797 25.00 NA TRUE FALSE TRUE 797 25 5 US 36 73 Sterling 43.34 -76.69
lake year index ilo ihi
5 2015 10297.93 8557.329 12038.52

The index estimates for the lakes, lakeainew, looks like this:

lake year index ilo ihi
1 2015 20224.32 10152.318 30296.32
2 2015 14695.00 12772.938 16617.06
3 2015 23968.00 20539.559 27396.44
4 2015 7112.00 2755.585 11468.41
5 2015 10297.93 8557.329 12038.52

Determining the targets

The AItarget() function is used to calculate lake-wide targets for the Adult Index of sea lamprey populations in the Great Lakes from the mean of specified years. The AItarget() function takes three arguments, but only the first one needs to be provided.

Default values are provided for years and adjust based on the decisions made by the Great Lakes Fishery Commission. Currently, these values are

lake years adjust
Superior 1994-1998 1.0000000
Michigan 1995-1999 0.5617978
Huron 1989-1993 0.2500000
Erie 1991-1995 1.0000000
Ontario 1993-1997 1.0000000

The returned object from the AItarget() function (called targ in this example) is a data frame with the calculated targets for the Adult Index and expanded PE of each Great Lake.

lake targInd
1 9664
2 24874
3 24113
4 3039
5 11368

Scaling up indices to PEs

Lake-specific conversion factors built in to the GLFC package, index2pe, are used to scale up indices of adult sea lamprey abundance in the Great Lakes to lake-wide population estimates.

index2pe
Superior 3.95
Michigan 1.87
Huron 2.87
Erie 1.45
Ontario 2.37
lake year index ilo ihi i2pe pe pelo pehi
5 2002 15675.00 11527.165 19822.83 2.37 37149.75 27319.38 46980.12
5 2003 11378.00 8827.062 13928.94 2.37 26965.86 20920.14 33011.58
5 2004 32586.00 22271.373 42900.63 2.37 77228.82 52783.15 101674.49
5 2005 26260.00 20577.328 31942.67 2.37 62236.20 48768.27 75704.13
5 2015 10297.93 8557.329 12038.52 2.37 24406.09 20280.87 28531.30

Generating a draft report

The AIreport() function is used to create a draft template-style report of the Adult Index estimates of sea lamprey in the Great Lakes.

## New RTF document created, C:\temp/2015 Adult Index - draft report.doc

As with the error checking report, the document generated by AIreport() is an rtf file with a *.doc extension, named YYYY Adult Index - draft report.doc.

The report has few paragraphs summarizing the latest estimates, along with 3 tables,

and 3 figures,

References