calc_GLMC: (SPFI) Data imputation by the GLMC method.

Description Usage Arguments Value Examples

Description

This reproduces the results of the GLMC imputation as described by John Carlile.

Usage

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

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 data frames. The data frames are: imputation.results, annual.estimate, prop.mean, data.df. The first, imputation.results, comprises 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_GLMC(N.ty, data.catch)

## End(Not run)

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