https://github.com/labrgrupo/labri_exe
๐๐ฎ๐ฏ๐ฅ๐ ๐ฆ๐ต๐ถ๐ป๐ ๐๐ป๐๐๐ฎ๐น๐น๐ฒ๐ฟ: Tool for estimating reference intervals using the indirect sampling method.
https://github.com/labrgrupo/labri_exe
clustering confidence-intervals equivalence-intervals flagging-rates fleiss-kappa indirect-method lin-concordance-correlation-coefficient r rmarkdown shiny-apps verification zlog
Last synced: about 1 year ago
JSON representation
๐๐ฎ๐ฏ๐ฅ๐ ๐ฆ๐ต๐ถ๐ป๐ ๐๐ป๐๐๐ฎ๐น๐น๐ฒ๐ฟ: Tool for estimating reference intervals using the indirect sampling method.
- Host: GitHub
- URL: https://github.com/labrgrupo/labri_exe
- Owner: labrgrupo
- License: gpl-3.0
- Created: 2022-01-07T04:36:30.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-01-16T12:41:25.000Z (over 1 year ago)
- Last Synced: 2025-02-08T18:26:05.272Z (over 1 year ago)
- Topics: clustering, confidence-intervals, equivalence-intervals, flagging-rates, fleiss-kappa, indirect-method, lin-concordance-correlation-coefficient, r, rmarkdown, shiny-apps, verification, zlog
- Language: R
- Homepage: https://grupolabr.com/LabRI_Packed
- Size: 62.9 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# [๐๐ฎ๐ฏ๐ฅ๐ ๐ฆ๐ต๐ถ๐ป๐ ๐๐ป๐๐๐ฎ๐น๐น๐ฒ๐ฟ](https://img.shields.io/badge/LabRI%20Shiny%20Application-%230070C0?style=for-the-badge&logoColor=white)



The **LabRI System** is a Shiny-based application designed for the estimation and verification of reference intervals in clinical laboratories. It combines RMarkdown scripts, Shiny applications, and automation scripts (.bat) to streamline its use without requiring direct interaction with RStudio. This repository includes three key components:
- **install_packages.bat**: Triggered by the shortcut `LabRI Package Installer`, this file executes the `install_packages.R` script, automating the installation and updating of the required R packages to properly configure the environment.
- **app.bat**: Triggered by the shortcut `LabRI`, this file executes the `launch_app.R` script, initializing the Shiny application and opening the interactive graphical interface to run the LabRI_script.Rmd, which implements the LabRI method.
- **LabRI_script.Rmd**: The primary script that implements the `LabRI method`, responsible for estimating and verifying reference intervals, and producing comprehensive HTML reports.
The image above provides an example of the initial interface of the **LabRI Shiny Application**, demonstrating how users configure essential parameters for data analysis. The "Name of the Responsible Specialist" section captures the analyst's name, while the "Define the Dataset" section allows users to upload a .csv, .xls, or .xlsx file and select the relevant data column. A status bar indicates the system's progress during processing. This streamlined interface ensures intuitive navigation and efficient setup for reference interval estimation and verification.

The **LabRI System** is distributed primarily as an executable installer, which organizes files, configures directories, and creates desktop shortcuts for easy access. As the installer relies on .bat files for automation, it is only compatible with the Windows operating system. The executable can be downloaded using the link below:
The **LabRI Method** is a core component of the **LabRI System**, serving as the analytical backbone for the estimation and verification of reference intervals in laboratory data. It comprises a set of algorithms, sub-algorithms, and mathematical procedures, implemented primarily in the **LabRI_script.Rmd** file.
**The LabRI Method is structured into two main modules:**
- **Estimation Module**: Focuses on adaptive, multi-criteria estimation of reference intervals through data cleaning, transformation, and clustering techniques, utilizing algorithms such as `refineR` and `reflimR`, available in the R packages `refineR` and `reflimR`, respectively, along with the Expectation-Maximization (EM) algorithm, supported by packages like `mclust` and `mixR`.
- **Verification Module**: Ensures the validity of estimated reference intervals through a three-level analysis, which evaluates statistical uncertainty, equivalence, and concordance, making the intervals reliable for clinical application.
## [๐. ๐๐๐๐ถ๐บ๐ฎ๐๐ถ๐ผ๐ป ๐ ๐ผ๐ฑ๐๐น๐ฒ](https://img.shields.io/badge/LabRI%20Shiny%20Application-%230070C0?style=for-the-badge&logoColor=white)
The **LabRI method** provides an adaptive and multi-criteria approach for the **indirect estimation** of reference intervals. This module integrates data cleaning, transformation, and clustering techniques, utilizing the `refineR`, `reflimR`, and **EM algorithms**. By combining **parametric and non-parametric percentile** approaches, the method estimates population reference intervals based on the number of clusters in the truncated distribution.
### Characteristics of the LabRI Method
- **Adaptive**:
- Adjusts dynamically based on data structure and characteristics, applying appropriate cleaning and transformation techniques.
- For **multi-cluster distributions**, the Centroid of Windsorized Reference Limits is applied to the reference limits estimated by `refineR` and `reflimR`. This involves a two-stage process: first, the Two-stage Winsorization sub-algorithm estimates the winsorized reference limits, adding robustness against extreme values. Next, the Hartigan-Wong Centroid Reference Limits sub-algorithm calculates the centroid, with the x and y coordinates representing the lower and upper reference limits, respectively, yielding a centralized and stable estimate. When clusters are sufficiently distant from each other, the EM algorithm is also incorporated to further refine the reference interval estimate.
- For **single-cluster distributions**, the EM algorithm applies parametric and non-parametric methods to derive the best reference interval estimate.
- **Multi-criteria**:
- Incorporates multiple criteria and methods for robust and comprehensive estimation and verification of reference intervals.
## [๐. ๐ฉ๐ฒ๐ฟ๐ถ๐ณ๐ถ๐ฐ๐ฎ๐๐ถ๐ผ๐ป ๐ ๐ผ๐ฑ๐๐น๐ฒ](https://img.shields.io/badge/LabRI%20Shiny%20Application-%230070C0?style=for-the-badge&logoColor=white)
To ensure reliability in clinical practice, it is crucial for laboratories to verify their reference intervals (RIs) before routine application. This verification is especially important for RIs derived through indirect methods.
### Structure of the Verification Module
The **Verification Module** performs a **three-level analysis** to assess whether the compared reference limits are equivalent:
1. **First-Level Analysis ~ Statistical Uncertainty**: Assesses the magnitude of statistical uncertainty in the reference limits.
2. **Second-Level Analysis ~ Distance Criterion Based on Equivalence Testing**: Compares the LabRI-estimated reference limit with a comparative limit to evaluate practical significance.
3. **Third-Level Analysis ~ Concordance Evaluation**: Evaluates concordance using tests like Fleissโ Kappa, Linโs Concordance Correlation Coefficient, and Flagging Rates.
### Details of the Three-Level Analysis
- **First-Level Analysis**:
- Evaluates statistical uncertainty associated with reference limits. If uncertainty is within acceptable bounds, the analysis proceeds to the second level.
- **Second-Level Analysis**:
- Compares the LabRI reference limit with a comparative reference limit using equivalence testing to assess practical significance.
- **Third-Level Analysis**:
- Conducted if the second-level analysis suggests "Possible Equivalence" or "Probable Equivalence". This level incorporates confidence intervals and uses Fleiss' Kappa, Lin's Concordance Correlation Coefficient, and Flagging Rates to ensure robust verification.
---
A simple usage tutorial, covering the installation of R and RStudio and instructions for using the Shiny tool, can be found on the **Grupo Lab R website**:
---
## [๐๐ผ๐ป๐๐ฎ๐ฐ๐](https://img.shields.io/badge/LabRI%20Shiny%20Application-%230070C0?style=for-the-badge&logoColor=white)
You are welcome to:
**Submit suggestions and Bugs at:** https://github.com/labrgrupo/LabRI_Tool/issues
**Write an Email with any questions and problems to:** alancdias@hotmail.com or labrgrupo@gmail.com
**Link to the publication:**
---