who_value2zscore | R Documentation |
Compute z-scores or centiles with respect to the WHO growth standard for given values of x vs. y (typically x is "agedays" and y is a measure like "htcm").
who_value2zscore(
x,
y,
x_var = "agedays",
y_var = "lenhtcm",
sex = "Female",
data = NULL
)
who_value2centile(
x,
y,
x_var = "agedays",
y_var = "lenhtcm",
sex = "Female",
data = NULL
)
x |
value or vector of values that correspond to a measure defined by |
y |
value or vector of values that correspond to a measure defined by |
x_var |
x variable name (typically "agedays") - see details |
y_var |
y variable name (typically "htcm", "lencm", or "wtkg") - see details |
sex |
"Male" or "Female" |
data |
optional data frame that supplies any of the other variables provided to the function |
for all supported pairings of y_var
and x_var
, type names(who_coefs)
who_centile2value
, who_zscore2value
# z-scores
who_value2zscore(1670, in2cm(44))
who_value2zscore(1670, lb2kg(48), y_var = "wtkg")
who_value2centile(1670, in2cm(44))
who_value2centile(1670, lb2kg(48), y_var = "wtkg")
# add haz derived from WHO data and compare to that provided with data
cpp$haz <- who_value2zscore(x = agedays, y = lencm, sex = sex, data = cpp)
# note that you can also do it this way
#' cpp$haz <- who_value2zscore(cpp$agedays, cpp$lencm, sex = cpp$sex)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.