z_df | R Documentation |
Calculates the z or z(log) values for laboratory measurement standardisation
as proposed in Hoffmann 2017 et al. for a complete data.frame
.
z_df(x, limits, probs = c(0.025, 0.975), log = FALSE) zlog_df(x, limits, probs = c(0.025, 0.975))
x |
|
limits |
|
probs |
|
log |
|
This is a wrapper function for z()
and lookup_limits()
. Please find
the details for the z/z(log) calculation at z()
.
zlog_df
is an alias for z_df(..., log = TRUE)
.
data.frame
, with the columns: "age", "sex" and all numeric
columns z/zlog transformed. If a column name is missing in limits$param
a warning is thrown and the column is set to NA
.
Sebastian Gibb
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.
zlog()
l <- data.frame( param = c("alb", "bili"), age = c(0, 0), sex = c("both", "both"), units = c("mg/l", "µmol/l"), lower = c(35, 2), upper = c(52, 21) ) x <- data.frame( age = 40:48, sex = rep(c("female", "male"), c(5, 4)), # from Hoffmann et al. 2017 alb = c(42, 34, 38, 43, 50, 42, 27, 31, 24), bili = c(11, 9, 2, 5, 22, 42, 37, 200, 20) ) z_df(x, l) zlog_df(x, l)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.