Learn R Programming

refineR (version 2.0.0)

Reference Interval Estimation using Real-World Data

Description

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)' . Additional guidance is in 'Ammer et al. (2023)' . The verification method is described in 'Beck et al. (2025)' .

Copy Link

Version

Install

install.packages('refineR')

Monthly Downloads

330

Version

2.0.0

License

GPL (>= 3)

Maintainer

Matthias Beck

Last Published

November 6th, 2025

Functions in refineR (2.0.0)

getEquivalenceLimits

Calculate equivalence limits
findPeaksAndValleys

Find the index of the peaks and valleys of the density estimation.
findRI

Function to estimate reference intervals for a single population
getRISimilarity

Calculate similarity of two reference intervals
generateHistData

Generate list with histogram data.
getRIMargins

Calculate uncertainty margins for a reference interval using the asymptotic method
getRI

Method to calculate reference intervals (percentiles) for objects of class 'RWDRI'
plot.RWDRI

Standard plot method for objects of class 'RWDRI'
invBoxCox

Inverse of the one-parameter Box-Cox transformation.
pnormApprox

Approximate calculation of CDF of normal distribution.
getVerificationArgs

Get the correct values for RI, RIperc, Lambda, and Shift for the verification
print.RWDRI

Standard print method for objects of class 'RWDRI'
perc_ci_asymptotic

Function to approximate the sampling uncertainty of quantiles using the asymptotic method
optimizeGrid

Helper function for grid search for mu and sigma.
testcase3

Simulated Testcase 3.
printVerificationTable

Print Verification Table
printDataFractionWithinOutsideRI

Print Data Fractions Within and Outside Reference Intervals
printSimilarityTable

Helper function to print the results of getRISimilarity
testcase2

Simulated Testcase 2.
refineR-package

refineR: Reference Interval Estimation using Real-World Data (RWD)
testcase5

Simulated Testcase 5.
testcase4

Simulated Testcase 4.
verifyRI

Verify Reference Intervals
testParam

Helper function to find optimal parameters lambda, mu and sigma.
plotRIVerification

Plot method for RI verification
testcase1

Simulated Testcase 1.
getRIfromRWDRI

Get Reference Interval from RWDRI
printTableRows

Helper function to print Table Rows
printTableHeader

Helper function to print Table Header
getSumForPArea

Helper function to calculate the amount of observed and estimated data points within specified regions around the peak.
alignVec

Helper function to align the content of printed tables
createVerificationTab

Create Verification Table
ashDensity

Estimate density of distribution employing the R package "ash" using R-wrapper function.
calculateCostHist

Calculate costs for a specific combinations of lambda, muVec and sigmaVec.
as.rgb

Convert color-names or RGB-code to possibly semi-transparent RGB-code.
cdfTruncatedBoxCox

Function to calculate the RI from a set of parameters
checkInvalidArgs

Check Invalid Arguments
defineSearchRegions

Helper function to define search regions for mu and sigma and to get the region around the main peak 'ab'
BoxCox

One-parameter Box-Cox transformation.
addGrid

Add a grid to an existing plot.
findRoundingBase

Estimate rounding base of the input data.
estimateAB

Helper function to find region around the main peak of a distribution
findMainPeak

Helper function to find the main peak of a distribution