Sometimes reference limits are not specified. That is often the case for biomarkers that are related to infection or cancer. Using zero as lower boundary results in skewed distributions (Hoffmann et al. 2017; fig. 7). Haeckel et al. 2015 suggested to set the lower reference limit to 0.15 of the upper one.
set_missing_limits(x, fraction = c(0.15, 20/3))data.frame, reference table, has to have the columns:
"lower" and "upper", numeric for the lower and upper reference
limits.  Additional columns are allowed (and ignored).
numeric(2), targeted fraction of the lower to the upper and
the upper to the lower limit. Haeckel et al. 2015 suggested to set the lower
limit to 0.15 of the upper one. We choose 20/3 (the reciprocal of 0.15) for
the upper to the lower one.
data.frame, the same as x but the "lower" and "upper" columns are
modified if there were NA before.
Georg Hoffmann, Frank Klawonn, Ralf Lichtinghagen, and Matthias Orth. 2017. "The Zlog-Value as Basis for the Standardization of Laboratory Results." LaboratoriumsMedizin 41 (1): 23–32. doi:10.1515/labmed-2016-0087 .
Rainer Haeckel, Werner Wosniok, Ebrhard Gurr and Burkhard Peil. 2015. "Permissible limits for uncertainty of measurement in laboratory medicine" Clinical Chemistry and Laboratory Medicine 53 (8): 1161-1171. doi:10.1515/cclm-2014-0874 .
reference <- data.frame(
    param = c("albumin", rep("bilirubin", 4)),
    age = c(0, 1, 2, 3, 7),             # ignored
    sex = "both",                       # ignored
    units = c("g/l", rep("µmol/l", 4)), # ignored
    lower = c(35, rep(NA, 4)),  # no real reference values
    upper = c(52, 5, 8, 13, 18) # no real reference values
)
set_missing_limits(reference)
#>       param age  sex  units lower upper
#> 1   albumin   0 both    g/l 35.00    52
#> 2 bilirubin   1 both µmol/l  0.75     5
#> 3 bilirubin   2 both µmol/l  1.20     8
#> 4 bilirubin   3 both µmol/l  1.95    13
#> 5 bilirubin   7 both µmol/l  2.70    18
set_missing_limits(reference, fraction = c(0.2, 5))
#>       param age  sex  units lower upper
#> 1   albumin   0 both    g/l  35.0    52
#> 2 bilirubin   1 both µmol/l   1.0     5
#> 3 bilirubin   2 both µmol/l   1.6     8
#> 4 bilirubin   3 both µmol/l   2.6    13
#> 5 bilirubin   7 both µmol/l   3.6    18