View source: R/calc_lw_residuals.R
calc_lw_residuals | R Documentation |
This function makes a log-log regression of length and weight for individual fish and then calculates a residual. A Bonferroni-corrected outlier correction can be applied to remove outliers. Option to use separate covariates for different strata.
calc_lw_residuals(
len,
wt,
stratum = NA,
bias_correction = TRUE,
outlier_rm = FALSE,
make_diagnostics = FALSE,
species_code = NA,
year = NA,
region = NA,
include_ci = TRUE
)
stratum |
Stratum code for length-weight regression by stratum. |
bias_correction |
Bias corrected residuals following Brodziak (2012) |
outlier_rm |
Should outliers be removed using Bonferoni test (cutoff = 0.7) |
make_diagnostics |
Output diagnostic plots and summaries? Default FALSE produces no diagnostics and summaries. If true, species_code and region should be specified. |
species_code |
Species code (provide if make_diagnostics = TRUE) |
year |
Year (provide if make_diagnostics = TRUE) |
region |
Region (provide if make_diagnostics = TRUE) |
include_ci |
Include upper and lower estimates for the 95 pct confidence interval of residuals in the output. |
length |
Set of individual fish lengths. |
weight |
Corresponding set of individual fish weights. |
Brodziak, J.2012. Fitting length-weight relationships with linear regression using the log-transformed allometric model with bias-correction. Pacific Islands Fish. Sci. Cent., Natl. Mar. Fish. Serv., NOAA, Honolulu, HI 96822-2396. Pacific Islands Fish. Sci. Cent. Admin. Rep. H-12-03, 4 p.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.