View source: R/fit_length_weight.R
fit_length_weight | R Documentation |
Fits a length weight relationship for use in catch expansion
fit_length_weight(
lengthWeightData,
speciesName,
speciesRules,
outputDir = NULL,
logfile = NULL,
suppressMessages = F
)
lengthWeightData |
Data frame. length-weight pairs. Each row represents an individual fish |
speciesName |
Character string. Common name for species |
speciesRules |
List. Obtained from |
outputDir |
Character string. Path to output directory (Default = NULL, no output written) |
logfile |
Character string. Specify the name for the log file generated describing all decisions made. (Default = NULL, no output written) |
suppressMessages |
Boolean. Suppress all messages |
List of model fit objects
commonSlope |
|
seasonalSlope |
|
The Weight-Length relationship is defined as
W_{ij} = \alpha L_{ij}^{\beta_j} e^{z_{ij}}
where,
W_{ij}
= Weight of fish i in season j, i = 1, ..., n, j = 1, ... J
L_{ij}
= Length of fish i in season j,
z_{ij}
~ N(0,\sigma^2)
,
and \beta_j
is effect of season j
On the more familiar log scale the model is
log(W_{ij}) = log(\alpha) + \beta_j log(L_{ij}) + {z_{ij}}
To test for a seasonal effect, we test the Null hypothesis:
{H_0}: \beta_j = \beta
against the alternative,
{H_1}: \beta_j \neq \beta
The test statistic is the standard F statistic
F = \frac{(RSS_{H_0}-RSS_{H_1})/(J-1)}{RSS_{H_1}/(n-J-1)}
which will have an F distribution with (J-1, n-J-1) degrees of freedom
where RSS= Residual Sum of Square s
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.