Package: refineR 2.0.0

Matthias Beck

refineR: Reference Interval Estimation using Real-World Data

Indirect method for the estimation of reference intervals (RIs) using Real-World Data ('RWD') and methods for comparing and verifying RIs. Estimates RIs by applying advanced statistical methods to routine diagnostic test measurements, which include both pathological and non-pathological samples, to model the distribution of non-pathological samples. This distribution is then used to derive reference intervals and support RI verification, i.e., deciding if a specific RI is suitable for the local population. The package also provides functions for printing and plotting algorithm results. See ?refineR for a detailed description of features. Version 1.0 of the algorithm is described in 'Ammer et al. (2021)' <doi:10.1038/s41598-021-95301-2>. Additional guidance is in 'Ammer et al. (2023)' <doi:10.1093/jalm/jfac101>. The verification method is described in 'Beck et al. (2025)' <doi:10.1515/cclm-2025-0728>.

Authors:Matthias Beck [aut, cre], Tatjana Ammer [aut], Christopher M Rank [aut], Andre Schuetzenmeister [aut]

refineR_2.0.0.tar.gz
refineR_2.0.0.tar.gz(r-4.7-any)refineR_2.0.0.tar.gz(r-4.6-any)
refineR_2.0.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
refineR/json (API)

# Install 'refineR' in R:
install.packages('refineR', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))
Datasets:

On CRAN:

Conda:

This package does not link to any Github/Gitlab/R-forge repository. No issue tracker or development information is available.

3.39 score 4 stars 31 scripts 463 downloads 1 mentions 8 exports 8 dependencies

Last updated from:0592f142c7. Checks:4 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK119
source / vignettesOK272
linux-release-x86_64OK120
wasm-releaseOK123

Exports:BoxCoxfindRIgetRIgetRISimilarityinvBoxCoxplot.RWDRIprint.RWDRIverifyRI

Dependencies:ashcodetoolsdigestfuturefuture.applyglobalslistenvparallelly

refineR: Reference Interval Estimation using Real-World Data (RWD)
Introduction | Input Data | Model Estimation and Presentation of Results | Default Settings | Advanced Settings | Computation of Confidence Intervals | Estimation using Two-Parameter Box-Cox Transformation | Print and getRI Function Arguments | Plot Function Arguments | References

Last update: 2025-11-06
Started: 2022-07-19

VeRUS: Verification of Reference Intervals Based on the Uncertainty of Sampling
Introduction | Description of VeRUS | Application of VeRUS | Possible Inputs of the verifyRI Function | Interpretation of the Results | Quantification of the Similarity of Two Reference Intervals | Advanced Applications | Invisible Output of the verifyRI Function | Non-Default Parameters to Define Uncertainty Margins | Customization of the Plot | Advanced Parameters for getRISimilarity | Alternative Verification Method | References

Last update: 2025-11-06
Started: 2025-11-06

Readme and manuals

Help Manual

Help pageTopics
refineR: Reference Interval Estimation using Real-World Data (RWD)refineR-package refineR
Add a grid to an existing plot.addGrid
Helper function to align the content of printed tablesalignVec
Convert color-names or RGB-code to possibly semi-transparent RGB-code.as.rgb
Estimate density of distribution employing the R package "ash" using R-wrapper function.ashDensity
One-parameter Box-Cox transformation.BoxCox
Calculate costs for a specific combinations of lambda, muVec and sigmaVec.calculateCostHist
Function to calculate the RI from a set of parameterscdfTruncatedBoxCox
Check Invalid ArgumentscheckInvalidArgs
Create Verification TablecreateVerificationTab
Helper function to define search regions for mu and sigma and to get the region around the main peak 'ab'defineSearchRegions
Helper function to find region around the main peak of a distributionestimateAB
Helper function to find the main peak of a distributionfindMainPeak
Find the index of the peaks and valleys of the density estimation.findPeaksAndValleys
Function to estimate reference intervals for a single populationfindRI
Estimate rounding base of the input data.findRoundingBase
Generate list with histogram data.generateHistData
Calculate equivalence limitsgetEquivalenceLimits
Method to calculate reference intervals (percentiles) for objects of class 'RWDRI'getRI
Get Reference Interval from RWDRIgetRIfromRWDRI
Calculate uncertainty margins for a reference interval using the asymptotic methodgetRIMargins
Calculate similarity of two reference intervalsgetRISimilarity
Helper function to calculate the amount of observed and estimated data points within specified regions around the peak.getSumForPArea
Get the correct values for RI, RIperc, Lambda, and Shift for the verificationgetVerificationArgs
Inverse of the one-parameter Box-Cox transformation.invBoxCox
Helper function for grid search for mu and sigma.optimizeGrid
Function to approximate the sampling uncertainty of quantiles using the asymptotic methodperc_ci_asymptotic
Standard plot method for objects of class 'RWDRI'plot.RWDRI
Plot method for RI verificationplotRIVerification
Approximate calculation of CDF of normal distribution.pnormApprox
Standard print method for objects of class 'RWDRI'print.RWDRI
Print Data Fractions Within and Outside Reference IntervalsprintDataFractionWithinOutsideRI
Helper function to print the results of getRISimilarityprintSimilarityTable
Helper function to print Table HeaderprintTableHeader
Helper function to print Table RowsprintTableRows
Print Verification TableprintVerificationTable
Simulated Testcase 1.testcase1
Simulated Testcase 2.testcase2
Simulated Testcase 3.testcase3
Simulated Testcase 4.testcase4
Simulated Testcase 5.testcase5
Helper function to find optimal parameters lambda, mu and sigma.testParam
Verify Reference IntervalsverifyRI