Logo des Repositoriums
Item type:Forschungsdaten,

Statistical Framework not only for Precision Livestock Management and Ethology, but for performing Sample Size Calculation for Binomially Distributed Traits, Incorporating Simple Sample Size Planning, Post-Hoc Analysis, Confidence Interval Inflation, Bayesian Integration of Prior Knowledge and Sampling Uncertainty

Beschreibung

This repository contains a comprehensive, open-source statistical framework developed at the Department of Agricultural and Biosystems Engineering (University of Kassel). The collection of animal-related indicators as part of on-farm self-monitoring serves to ensure compliance with animal welfare standards and to inform evidence-based management decisions. Rigid specifications for sample sizes do not account for the stochastic nature of finite populations, varying baseline prevalences, and diagnostic uncertainties in practice. To address these limitations, the developed R software framework integrates deterministic, exact, and stochastic estimation methods into a modular architecture. The software package is divided into four specialized main tools (Tools A through D), which cover biometric experimental design, matrix generation, post-hoc precision control, and the modeling of diagnostic misclassifications, as well as additional help tools.

The framework is divided into four highly specialized modules

Tool A: Case-Specific Sample Size Calculation and Cluster Design
Tool A determines the minimum number of animals required for a specific survey design while simultaneously comparing four calculation methods (asymptotic normal approximation, Wilson score, exact binomial inversion, and Bayesian credibility interval).

Tool B: Matrix Generation for Experimental Design
Tool B transforms this logic into tabular reference matrices for variable inventory levels and accuracy requirements.

Tool C: Post-hoc Analysis with Fixed Assumptions
If discrepancies arise in the field between the assumed a priori prevalence and the observed frequency of findings, Tool C quantifies the resulting increase in the standard error due to quadratic variance linking.

Tool D: Modeling Epistemic Uncertainty and Auto-Tuning
Tool D addresses the epistemic measurement uncertainty of imperfect acquisition protocols (Se < 1.0, Sp < 1.0) using stochastic simulation algorithms.

Technical Implementation & Open Science
Championing the principles of Open Science, the entire framework is built on R, a free and open-source statistical programming language. It strictly separates backend calculation from user configuration, requiring no advanced programming skills from the end-user. Utilizing the power of Quarto and LaTeX, the toolchain automatically translates the statistical outputs into fully formatted, publication-ready PDF reports. These dynamic documents contain all relevant cross-tabulations, advanced visualizations, and an automatically generated methodological decision-making guide, ensuring maximum transparency and full reproducibility for the scientific community.

Invitation for Collaboration and Error Correction
Statistical mastery of attributive evaluation and measurement processes at the interface between animal ethology, veterinary medicine, and machine learning requires the continuous refinement of biometric algorithms. The R software framework presented here is intended as an open-source tool explicitly provided for critical review, methodological refinement, and collaborative expansion. The release of the source code under the CC BY-SA 4.0 license invites researchers in livestock management, biometrics, and data science to use the scripts in their own studies, adapt them, and contribute methodological improvements to the repository via the established peer-review process (pull requests).

Pending full simulative validation, the diagnoses derived from the framework should therefore always be interpreted as exploratory decision-making aids. They possess the potential to significantly enrich the critical discourse between ethologists and data scientists during the generation of ground-truth data, but they do not replace a professional plausibility check of the resulting machine learning dataset.

The present framework is not intended as a static final product, but rather as a dynamic, iteratively growing tool in the spirit of Open Science. Despite careful algorithmic implementation and extensive test-driven validation via stochastic simulations, unforeseen edge cases can always arise when analyzing complex field data. In particular, there is a specific need for further development in the mathematical modeling of Tool D, which currently provides two computational approaches for capturing diagnostic uncertainties.

Therefore, users, researchers, and data scientists are explicitly invited to critically review the provided scripts and Quarto templates and to adapt them to their own specific research questions. Feedback regarding methodological inaccuracies, programming errors (bugs), or suggestions for functional extensions—such as the integration of alternative concordance measures or specific weighting matrices for novel animal welfare indicators—is highly welcome. Through this open, interdisciplinary exchange, the framework will be continuously refined in order to sustainably and collaboratively bridge the methodological gap between practical ethology and robust data science.

Metadata

Bertram Schäfer
Ulrike Wilczek
mehr anzeigen
Dateien
Dokument
Typ
Größe
Kulig, Boris; Bertram Schäfer; Ulrike Wilczek; Lange, Anita; Hensel, Oliver; Jung, Lisa. (2026). Statistical Framework not only for Precision Livestock Management and Ethology, but for performing Sample Size Calculation for Binomially Distributed Traits, Incorporating Simple Sample Size Planning, Post-Hoc Analysis, Confidence Interval Inflation, Bayesian Integration of Prior Knowledge and Sampling Uncertainty. DaKS. https://daks.uni-kassel.de/handle/123456789/988

Lizenz

Solange nicht anders angezeigt, wird die Lizenz wie folgt beschrieben: Attribution-ShareAlike 4.0 International