calc_AAPC: (SPFI) Data imputation by the Accrued APC (AAPC) method.

Description Usage Arguments Value Examples

Description

This is similar to APC imputation as described on page 99 and Appendix 5 of REPORT TCCHINOOK (09)-2 (http://www.psc.org/download/35/chinook-technical-committee/2120/tcchinook09-2.pdf). The abundance from a year-stratum contributes to the mean proportion estimate if the year-stratum has catch >1000.

Usage

1
2
calc_AAPC(data.df, data.catch, stratum.var = "fishery.index",
  year.var = "return.year", value.var = "N.ty", catchmin = 0)

Arguments

data.df

A data frame. Typically output from calc_N.ty.

data.catch

A list with structure equivalent to the output from the function readCatchData.

stratum.var

A string. The name of the stratum variable. Default is "fishery.index".

year.var

A string. The name of the year variable. Default is "return.year".

value.var

A string. The name of the data variable. Default is "N.ty".

catchmin

An integer of length one. The minimum catch criteria for inclusion of a stratum in the estimation. Strata below this value are set to NA and estimated by imputation. Default is 0 (i.e. no strata are reset).

Value

A list of four elements named: model, imputation.results, annual.estimate, data.df. The first, model, is a list of the linear regression results for each stratum (including the data used in fit), the second, imputation.results, is a data frame of two columns. The first column usually has the same name as the year.var argument and the second is N.t. The other data frames represent the values calculated during intermediary steps. The time series of proportions for year with complete strata can be found in data.df.

Examples

1
2
3
4
5
## Not run: 
N.ty <- calc_N.ty(T.ty = T.ty, hcwt.ty = hcwt.ty)
results.list <- calc_AAPC(N.ty, data.catch)

## End(Not run)

MichaelFolkes/ctctools documentation built on May 7, 2019, 4:56 p.m.