Learn R Programming

sitar (version 1.0.1)

cLMS: LMS conversion to and from z-scores

Description

Routines to handle references constructed with the LMS method. Given a set of LMS values, the functions convert z-scores to measurement centiles and vice versa.

Usage

zLMS(x, L = 1, M, S)
cLMS(z, L = 1, M, S)

Arguments

x
vector of measurements to be converted to z-scores.
z
scalar or vector of z-scores to be converted to measurements.
L
vector of Box-Cox transformation (lambda) values, L in the LMS method.
M
vector of medians (mu), M in the LMS method.
S
vector of coefficients of variation (sigma), S in the LMS method.

Value

  • zLMS and cLMS return a vector the same length as M.

Details

x, L, M and S should all be the same length. z can be scalar or vector. The formulae converting x to z and vice versa are: $$z = \frac{(x/M)^L - 1}{L S}$$

$$x = M (1 + L S z)^{1/L})$$ where L has 10^-7 added if it is zero. The LMS method is the same as the BCCG family in the gamlss package.

See Also

z2cent, lms2z

Examples

Run this code
cLMS(z = -2:2, L = 1:-1, M = 5:7, S = rep(0.1, 3))
zLMS(x = 6.5, L = 1:-1, M = 5:7, S = rep(0.1, 3))

Run the code above in your browser using DataLab