This function takes z-scores based on the GLI-2012 equations, plus demographic data (age, height, gender and ethnicity), and converts them back into absolute spirometry measurements (FEV1, FVC, etc) in lt.
raw_GLI(
age,
height,
gender = 1,
ethnicity = 1,
FEV1 = NULL,
FVC = NULL,
FEV1FVC = NULL,
FEF2575 = NULL,
FEF75 = NULL,
FEV075 = NULL,
FEV075FVC = NULL
)
If only one spirometry z-score argument is supplied, the function returns a numeric vector. If more are supplied, the function returns a data.frame with the same number of columns.
Age in years
Height in meters
Gender (1 = male, 2 = female) or a factor with two levels (first = male). Default is 1.
Ethnicity (1 = Caucasian, 2 = African-American, 3 = NE Asian, 4 = SE Asian, 5 = Other/mixed). Default is 1.
Forced Expiratory Volume in 1 second (z-score)
Forced Vital Capacity (z-score)
FEV1 / FVC (as z-score)
Forced Expiratory Flow between 25% and 75% of FVC (z-score)
Forced Expiratory Flow at 75% of FVC (z-score)
Forced Expiratory Volume in 0.75 sec (z-score)
FEV0.75 / FVC (as z-score)
At least one of the spirometric z-score arguments must be set (i.e. be
non-NULL
). Arguments age
, height
, gender
and
ethnicity
must be vectors of length equal to the length of the
z-score vector(s), or of length one, in which case their value is recycled.
If any input vector is not of equal length, the function stops with an error.
# Random data, 4 patients, one z-score parameter supplied (FEV1)
raw_GLI(age=seq(25,40,5), height=c(1.8, 1.9, 1.75, 1.85),
gender=c(2,1,2,1), FEV1=c(-1.2, -1.9, 0, 0.5))
Run the code above in your browser using DataLab