This function takes absolute spirometry measurements (FEV1, FVC or FEV1FVC) in lt plus demographic data (age, height, gender and ethnicity) and converts them to percent (%) predicted based on the GLI global (2022) equations.
pctpred_GLIgl(age, height, gender = 1, FEV1 = NULL, FVC = NULL, FEV1FVC = NULL)
If only one spirometry 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.
Forced Expiratory Volume in 1 second (lt)
Forced Vital Capacity (lt)
FEV1 / FVC ratio
At least one of the spirometric measurement arguments must be set (i.e. be
non-NULL
). Arguments age
, height
and gender
must be vectors of length equal to the length of the
spirometric measurement 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 parameter supplied (FEV1)
pctpred_GLIgl(age=seq(25,40,5), height=c(1.8, 1.9, 1.75, 1.85),
gender=c(2,1,2,1), FEV1=c(3.5, 4, 3.6, 3.9))
Run the code above in your browser using DataLab