Rdocumentation
powered by
Learn R Programming
EMOTIONS: Ensemble Models fOr lacTatION curveS
INDEX
Copy Link
Link to current version
Version
Version
1.1
1.0
Install
install.packages('EMOTIONS')
Monthly Downloads
177
Version
1.1
License
GPL-3
Maintainer
Pablo Fonseca
Last Published
January 28th, 2026
Functions in EMOTIONS (1.1)
Search all functions
ModelsLac
Performs the model fitting and the weight assignment based on different strategies for each individual ID
milkloss_detect
Identify milk loss events and resilience indicators from daily milk yields
ParDef
Define the parameters for the lactation curve models to be fitted
model_pars
A data frame containing the models included in the EMOTIONS package that can have the parameters edited
LacCurveFit
A wrap function to the ModelsLac function that allows the fit of lactation curve models based on daily production and days in milk records simultaneously for a list of animals
ModelRankRange
Create a line plot that shows the range of the ranks obtained for each model across the individuals
PlotWeightLac
Plot the actual daily milk daily production and the predicted values obtained by the ensemble model
PlotMilkLoss
Plot the actual daily milk daily production and the predicted values highlighting the detected milk loss events
GetLacModelsMetrics
Estimate the Akaike information criterion (AIC), Bayeasian information criterion (BIC), root mean square percentage error (RMSPE) and mean squared error (MAE) for the fitted models
BMAweight_gamma
Estimate normalized model`s weights based on a Expectation–Maximization (EM) algorithm using a gamma distribution
CosSquaredWeight
Estimate normalized model`s weights based on the cosine similarity for each model's predictions
LacData
A data frame containing the daily milk yield for 100 individuals up to 210 days in milk
imp_my
Impute missing daily milk yields using the ensemble created
ResInd
A function to estimate resilience estimators (logarithm of variance, lag1 autocorrelation and skewness) based on daily milk production records
RidgeModels
The function RidgeModels allows the visualization of the distribution of model's ranks across individuals using ridge density plots
VarWeight
Estimate normalized model`s weights based on the variance of the predictions
models_EMOTIONS
A data frame containing the daily milk yield for 100 individuals up to 210 days in milk