| getN {scape} | R Documentation |
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 |
what |
name of model element: |
series |
vector of strings indicating which gears or surveys to analyze (all by default). |
digits |
number of decimal places to use when rounding, or
|
Value
Numeric vector of year-specific sample sizes, or a list of such vectors when analyzing multiple series.
Note
Thin wrapper to access model$element$SS, providing a uniform
interface with other get* and est* functions.
See discussion in the estN documentation.
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
## 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