refineR2.0.0 package

Reference Interval Estimation using Real-World Data

addGrid

Add a grid to an existing plot.

alignVec

Helper function to align the content of printed tables

as.rgb

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

ashDensity

Estimate density of distribution employing the R package "ash" using R...

BoxCox

One-parameter Box-Cox transformation.

calculateCostHist

Calculate costs for a specific combinations of lambda, muVec and sigma...

cdfTruncatedBoxCox

Function to calculate the RI from a set of parameters

checkInvalidArgs

Check Invalid Arguments

createVerificationTab

Create Verification Table

defineSearchRegions

Helper function to define search regions for mu and sigma and to get t...

estimateAB

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

findMainPeak

Helper function to find the main peak of a distribution

findPeaksAndValleys

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

findRI

Function to estimate reference intervals for a single population

findRoundingBase

Estimate rounding base of the input data.

generateHistData

Generate list with histogram data.

getEquivalenceLimits

Calculate equivalence limits

getRI

Method to calculate reference intervals (percentiles) for objects of c...

getRIfromRWDRI

Get Reference Interval from RWDRI

getRIMargins

Calculate uncertainty margins for a reference interval using the asymp...

getRISimilarity

Calculate similarity of two reference intervals

getSumForPArea

Helper function to calculate the amount of observed and estimated data...

getVerificationArgs

Get the correct values for RI, RIperc, Lambda, and Shift for the verif...

invBoxCox

Inverse of the one-parameter Box-Cox transformation.

optimizeGrid

Helper function for grid search for mu and sigma.

perc_ci_asymptotic

Function to approximate the sampling uncertainty of quantiles using th...

plot.RWDRI

Standard plot method for objects of class 'RWDRI'

plotRIVerification

Plot method for RI verification

pnormApprox

Approximate calculation of CDF of normal distribution.

print.RWDRI

Standard print method for objects of class 'RWDRI'

printDataFractionWithinOutsideRI

Print Data Fractions Within and Outside Reference Intervals

printSimilarityTable

Helper function to print the results of getRISimilarity

printTableHeader

Helper function to print Table Header

printTableRows

Helper function to print Table Rows

printVerificationTable

Print Verification Table

refineR-Package

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

testParam

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

verifyRI

Verify Reference Intervals

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>.

  • Maintainer: Matthias Beck
  • License: GPL (>= 3)
  • Last published: 2025-11-06