scape (version 2.3-2)

getN: Extract Sample Size

Description

Extract the sample size that was used in a model, from catch-at-age or catch-at-length data.

Usage

getN(model, what="CAc", series=NULL, digits=NULL)

Arguments

model

fitted scape model containing catch-at-age and/or catch-at-length data.

what

name of model element: "CAc", "CAs", "CLc", or "CLs".

series

vector of strings indicating which gears or surveys to analyze (all by default).

digits

number of decimal places to use when rounding, or NULL to suppress rounding.

Value

Numeric vector of year-specific sample sizes, or a list of such vectors when analyzing multiple series.

See Also

getN, getSigmaI, getSigmaR, estN, estSigmaI, and estSigmaR extract and estimate sample sizes and sigmas.

scape-package gives an overview of the package.

Examples

Run this code
# NOT RUN {
## Exploring candidate sample sizes:

getN(x.sbw)  # sample sizes used in assessment: number of tows
estN(x.sbw)  # effective sample size, given data (tows) and model fit

## Multiple series:

getN(x.ling, "CLc")              # sample size used in assessment
getN(x.ling, "CLc", digits=0)    # rounded
estN(x.ling, "CLc")              # model fit implies larger sample sizes

getN(x.ling, "CLc", series="1", digits=0)  # get one series
estN(x.ling, "CLc", series="1")            # estimate one series
# }

Run the code above in your browser using DataCamp Workspace