02 octubre 2026
Morefi © 2024 by Hugo Aguirre Villaseñor is licensed under a Creative Commons Attribution 4.0 International License.
Morefi
The Morefi package, which stands for Morphological Relationships Fitted by Robust Regression, is a methodological package developed in R. It includes functions that support data analysis and ensure reproducibility of the results reported in the article by Aguirre-Villaseñor et al. (2025).
In fisheries monitoring, body length is the most commonly measured parameter because it is quick and easy to obtain. In contrast, measuring weight requires a level and stable scale, which can be difficult to secure in field sampling. Biometric relationships are crucial in fisheries biology. When accurately calculated, these relationships can be very useful for management purposes, especially for estimating an organism’s total length or weight based on other body measurements.
Many species are marketed through artisanal fishing in various commercial forms. However, there are currently no biometric relationships that allow for predicting live weight (the total weight of the fish) from the different categories of landed weight, such as fillet weight, gutted weight, or frozen weight.
The objective of this package is to provide quantitative models for various morphological relationships that help predict: a) the expected live weight of different landed weight categories, b) the expected fillet yield from various commercial presentations, and c) testing the suitability of fillet yield as a reference point in managing the target species.
For this purpose, some functions and a vignette were created to explain the process step by step. Its implementation streamlines the methodology and enhances the clarity and impact of both the results and graphical presentations (tables and figures are personalized).
The functions included in the Morefi package enable the evaluation of length-length, weight-weight and length-weight biometric relationships using data that exhibit high variability and do not meet the assumptions necessary for adjustment via least squares. Given this variability, a robust regression method is employed for analysis. The “robustbase” package (version 0.99-2) was utilized to fit robust regression models, using the functions lmrob() for linear and nlrob() for non-linear regression (Maechler et al., 2024).
Installation
You can install the development version of Morefi from GitHub using one of the following options:
Using the pak package
# install.packages("pak")
pak::pak("Macrurido/Morefi")or using the devtools package
Data available in the package
The package contains two data sets. Data are available under the terms of the The Creative Commons Attribution 4.0 International (CC BY 4.0).
Bullseye puffer measures
To demonstrate how the package functions, we utilize the dataset botete, containing 1,397 fish across 7 variables: the total length(LT), standard length (SL), body trunk length (LB), total weight (WT), body trunk weight (WB), fillet weight (Wfi) and Fleet of the bullseye puffer (Sphoeroides annulatus), collected from the Eastern Central Pacific. In this dataset, the landing category is included in the “Fleet” variable, which is categorized as follows: 1 indicates Fresh, while 2 denotes Frozen-thawed. This biometric data file, is included in the package with permission from the Instituto Mexicano de Investigación en Pesca y Acuacultura Sustentables (Mexican Institute for Research in Sustainable Fishing and Aquaculture).
To access the data file, the data frame is stored in an object, such as ‘mydata’.
mydata <- Morefi::BoteteBullseye puffer fish landings
A second dataset Botete_land, provided the Mexican fishing records of bullseye puffer landed on the Pacific coast in 2023 and their live weight corresponding live weight for each weight category (kg): total (WT), body trunk (WB) or fillet (Wfi), either Fresh or Frozen-thawed (SIPESCA, 2024).
To access the data file, the data frame is stored in catch.
catch <- Morefi::Botete_landMorefi functions
The Morefi package includes functions that facilitate data analysis and ensure reproducibility of results. The functions for analysis are outlined below, followed by the functions for plotting.
Analysis functions
fn_ARSS: Perform the Coincident Curves Test, to determine if there are significant differences between the fitted curves for each database. It is based on the Analysis of the Residual Sum of Squares (ARSS) (Chen et al., 1992).
fn_dfa: This function uses the broom::augment() function to extract observed values, predictions, residuals, and weighted values from the fitted regression summary. An additional column has been added to code errors on a scale. It then transforms these components into tidy tibbles.
fn_freq: The function calculates a frequency distribution of data.
fn_freqw This is a methodological function to calculate the percentage frequencies of weights by model adjusted using the robust regression approach.
fn_fyield: Calculates the fillet yield by dividing a defined weight reference point bm by the mean, lower, and upper confidence interval of 95% (IC95%) of the estimated fillet weight, respectively.
fn_intervals: Calculates a non-parametric confidence and predicted intervals using the function predFit() from the package investr (version 1.4.2).
fn_R2RV: Calculates a robust version of the coefficient of determination (Renaud & Victoria-Feser, 2010).
fn_summary: Customizes and stores the summary of each fitted regression.
fn_Wlive: The live weight, which is the total weight of an organism, is estimated based on the weights of different landing categories, such as eviscerated weight and fillet weight. These estimates are derived using regression parameters that relate total weight to the weight of each landing category.
fn_xseq: Generates a data frame with a sequence for independent variables (including minimum and maximum values) and selects it according to the model.
Plot functions
To assist with analysis, three functions have been created to generate a composite figure.
fn_fig_e: The function creates a graph that displays residuals on the vertical axis and either the independent variable or predicted values on the horizontal axis, as determined by the researcher. The residuals are color-coded using a weighted scale.
fn_fig_fw: The fitted values of the models for a landed presentation category were displayed as a multi-panel plot. The observed data points for each fitted relationship were categorized according to a weighted color scale.
fn_fig_w: The residual structure was analyzed by graphing residuals against weighted values. A custom multi-panel plot illustrates the structure of each fitted relationship, categorized by a color-weighted scale of values.
More details
For more information, please refer to the respective vignettes, which offer detailed descriptions of each function, its operations, and examples.
Example
To demonstrate how the package works, please follow the step-by-step process outlined in the Example-Analysis vignette, which reconstructs the results presented in the article by Aguirre-Villaseñor et al. (2025).
References
Aguirre-Villaseñor, H., Morales-Bojórquez, E., & Cisneros-Mata, M. Á. (2025). Biometric relationships as a fisheries management tool: A case study on the bullseye puffer (Sphoeroides annulatus) in an artisanal fishery. Fisheries Research, 292, 107593. DOI
Chen, Y., Jackson, D. A., Harvey, H. H. 1992. A comparison of von Bertalanffy and polynomial functions in modelling fish growth data. Canadian Journal of Fisheries and Aquatic Sciences 49(6): 1228–1235. DOI
Maechler M, Rousseeuw P, Croux C, Todorov V, Ruckstuhl A, Salibian-Barrera M, Verbeke T, Koller M, Conceicao EL, Anna di Palma M (2024). robustbase: Basic Robust Statistics. R package version 0.99-4-1. DOI
Renaud, O., Victoria-Feser, M. P. (2010). A robust coefficient of determination for regression. Journal of Statistical Planning and Inference. 140(7), 1852-1862. DOI
SIPESCA. 2024. Sistema de Información de Pesca y Acuacultura – SIPESCA. Comisión Nacional de Pesca y Acuacultura. https://sipesca.conapesca.gob.mx (accessed 7 February 2024).
Citation
Aguirre-Villaseñor H (2024). Morefi: Morphological Relationships Fitted by Robust Regression. R package version 0.1.0, https://macrurido.github.io/Morefi/.

