Title: | Implementation of Spirometry Equations |
---|---|
Description: | Implementation of various spirometry equations in R, currently the GLI-2012 (Global Lung Initiative; Quanjer et al. 2012 <doi:10.1183/09031936.00080312>), the race-neutral GLI global 2022 (Global Lung Initiative; Bowerman et al. 2023 <doi:10.1164/rccm.202205-0963OC>), the NHANES3 (National Health and Nutrition Examination Survey; Hankinson et al. 1999 <doi:10.1164/ajrccm.159.1.9712108>) and the JRS 2014 (Japanese Respiratory Society; Kubota et al. 2014 <doi:10.1016/j.resinv.2014.03.003>) equations. Also the GLI-2017 diffusing capacity equations <doi:10.1183/13993003.00010-2017> are implemented. Contains user-friendly functions to calculate predicted and LLN (Lower Limit of Normal) values for different spirometric parameters such as FEV1 (Forced Expiratory Volume in 1 second), FVC (Forced Vital Capacity), etc, and to convert absolute spirometry measurements to percent (%) predicted and z-scores. |
Authors: | Theodore Lytras |
Maintainer: | Theodore Lytras <[email protected]> |
License: | GPL (>=2) |
Version: | 0.5 |
Built: | 2024-11-03 06:21:46 UTC |
Source: | https://github.com/thlytras/rspiro |
R package rspiro implements multiple spirometry equations: currently the GLI-2012 (Quanjer), GLI global 2022, JRS-2014, NHANES III (Hankinson), as well as the GLI-2017 diffusing capacity equations (Stanojevic et al). More may be added later. It offers a convenient interface to calculate predicted or LLN (Lower Limit of Normal) values given demographic data, or to convert absolute values to percent ( predicted or z-scores.
To ensure a consistent interface,
package functions are named with a prefix indicating the functionality
and a suffix indicating the spirometric equations used, for example
LLN_GLI
calculates Lower Limits of Normal using the GLI-2012
equations. The suffix is currently one of 'GLI', 'GLIgl', 'JRS', 'NHANES3' or 'GLIdiff'.
The prefix is one of 'LLN_', 'pred_', 'pctpred_' or 'zscore_'.
Functions prefixed 'LLN_' or 'pred_' accept as input demographic information (age, gender, height, ethnicity) and calculate the Lower Limit of Normal and the predicted value, respectively, for a given spirometry parameter (FEV1, FVC, etc). Functions prefixed 'pctpred_' or 'zscore_' accept absolute spirometry values (plus demographics) and convert those to percent ( z-scores, respectively. Please note the difference between 'pred_' and 'pctpred_' above.
For detailed information, refer to the respective function documentations.
The development version of rspiro is available on GitHub https://github.com/thlytras/rspiro. To report problems and bugs, or to request a feature, please go there and open an issue. Alternatively, send an email to Theodore Lytras [email protected].
Theodore Lytras [email protected].
This function calculates LLNs (Lower Limits of Normal) for the various spirometry parameters, using the GLI-2012 equations. It accepts as input age, height, gender and ethnicity.
LLN_GLI(age, height, gender = 1, ethnicity = 1, param = "FEV1")
LLN_GLI(age, height, gender = 1, ethnicity = 1, param = "FEV1")
age |
Age in years |
height |
Height in meters |
gender |
Gender (1 = male, 2 = female) or a factor with two levels (first = male). Default is 1. |
ethnicity |
Ethnicity (1 = Caucasian, 2 = African-American, 3 = NE Asian, 4 = SE Asian, 5 = Other/mixed). Default is 1. |
param |
A character vector, containing one of more of the following parameters (case insensitive): "FEV1", "FVC", "FEV1FVC", "FEF2575", "FEF75", "FEV075", "FEV075FVC" |
Arguments age
, height
, gender
and ethnicity
are vectors
of equal length, or of length one, in which case the value is recycled; if the four vectors are
not of equal length, the function stops with an error.
If param
has length one, the function returns a numeric vector. If param
has length >1, it returns a data.frame with length(param)
columns.
# Find LLN of FEV1 and FVC for Caucasian women aged 20 to 70 and with a height of 1.70 meters. LLN_GLI(20:70, 1.7, 2, param=c("FEV1","FVC"))
# Find LLN of FEV1 and FVC for Caucasian women aged 20 to 70 and with a height of 1.70 meters. LLN_GLI(20:70, 1.7, 2, param=c("FEV1","FVC"))
This function calculates LLNs (Lower Limits of Normal) for TLCO (transfer factor of the lung for carbon monoxide), KCO (transfer coefficient of the lung for carbon monoxide) and VA (alveolar volume) using the GLI (2017) equations. It accepts as input age, height, gender.
LLN_GLIdiff(age, height, gender = 1, param = "TLCO", SI = TRUE)
LLN_GLIdiff(age, height, gender = 1, param = "TLCO", SI = TRUE)
age |
Age in years |
height |
Height in meters |
gender |
Gender (1 = male, 2 = female) or a factor with two levels (first = male). Default is 1. |
param |
A character vector, containing one of more of the following parameters (case insensitive): "TLCO", "KCO" or "VA" |
SI |
(default TRUE) Use SI (mmol/min/kPa) or traditional (ml/min/mmHg) units? |
Arguments age
, height
and gender
are vectors
of equal length, or of length one, in which case the value is recycled; if the four vectors are
not of equal length, the function stops with an error.
If param
has length one, the function returns a numeric vector. If param
has length >1, it returns a data.frame with length(param)
columns.
# Find LLN of TLCO and VA for women aged 20 to 70 and with a height of 1.70 meters. LLN_GLIdiff(20:70, 1.7, 2, param=c("TLCO","VA"))
# Find LLN of TLCO and VA for women aged 20 to 70 and with a height of 1.70 meters. LLN_GLIdiff(20:70, 1.7, 2, param=c("TLCO","VA"))
This function calculates LLNs (Lower Limits of Normal) for the various spirometry parameters, using the GLI global (2022) equations. It accepts as input age, height, gender.
LLN_GLIgl(age, height, gender = 1, param = "FEV1")
LLN_GLIgl(age, height, gender = 1, param = "FEV1")
age |
Age in years |
height |
Height in meters |
gender |
Gender (1 = male, 2 = female) or a factor with two levels (first = male). Default is 1. |
param |
A character vector, containing one of more of the following parameters (case insensitive): "FEV1", "FVC", "FEV1FVC" |
Arguments age
, height
and gender
are vectors
of equal length, or of length one, in which case the value is recycled; if the four vectors are
not of equal length, the function stops with an error.
If param
has length one, the function returns a numeric vector. If param
has length >1, it returns a data.frame with length(param)
columns.
# Find LLN of FEV1 and FVC for women aged 20 to 70 and with a height of 1.70 meters. LLN_GLIgl(20:70, 1.7, 2, param=c("FEV1","FVC"))
# Find LLN of FEV1 and FVC for women aged 20 to 70 and with a height of 1.70 meters. LLN_GLIgl(20:70, 1.7, 2, param=c("FEV1","FVC"))
This function calculates LLNs (Lower Limits of Normal) for the various spirometry parameters, using the JRS (Japanese Respiratory Society 2014) equations. It accepts as input age, height, gender.
LLN_JRS(age, height, gender = 1, param = "FEV1")
LLN_JRS(age, height, gender = 1, param = "FEV1")
age |
Age in years |
height |
Height in meters |
gender |
Gender (1 = male, 2 = female) or a factor with two levels (first = male). Default is 1. |
param |
A character vector, containing one of more of the following parameters (case insensitive): "FEV1", "FVC", "VC", "FEV1FVC" |
Arguments age
, height
and gender
are vectors
of equal length, or of length one, in which case the value is recycled; if the four vectors are
not of equal length, the function stops with an error.
If param
has length one, the function returns a numeric vector. If param
has length >1, it returns a data.frame with length(param)
columns.
# Find LLN of FEV1 and FVC for Japanese women aged 20 to 70 and with a height of 1.70 meters. LLN_JRS(20:70, 1.7, 2, param=c("FEV1","FVC"))
# Find LLN of FEV1 and FVC for Japanese women aged 20 to 70 and with a height of 1.70 meters. LLN_JRS(20:70, 1.7, 2, param=c("FEV1","FVC"))
This function calculates LLNs (Lower Limits of Normal) for the various spirometry parameters, using the NHANES III equations. It accepts as input age, height, gender and ethnicity.
LLN_NHANES3(age, height, gender = 1, ethnicity = 1, param = "FEV1")
LLN_NHANES3(age, height, gender = 1, ethnicity = 1, param = "FEV1")
age |
Age in years |
height |
Height in meters |
gender |
Gender (1 = male, 2 = female) or a factor with two levels (first = male). Default is 1. |
ethnicity |
Ethnicity (1 = Caucasian, 2 = African-American, 3 = Mexican-American). Default is 1. |
param |
A character vector, containing one of more of the following parameters (case insensitive): "FEV1", "FVC", "FEV1FVC", "PEF", "FEF2575", "FEV6", "FEV1FEV6" |
Arguments age
, height
, gender
and ethnicity
are vectors
of equal length, or of length one, in which case the value is recycled; if the four vectors are
not of equal length, the function stops with an error.
If param
has length one, the function returns a numeric vector. If param
has length >1, it returns a data.frame with length(param)
columns.
# Find LLN of FEV1 and FVC for Caucasian women aged 20 to 70 and with a height of 1.70 meters. LLN_NHANES3(20:70, 1.7, 2, param=c("FEV1","FVC"))
# Find LLN of FEV1 and FVC for Caucasian women aged 20 to 70 and with a height of 1.70 meters. LLN_NHANES3(20:70, 1.7, 2, param=c("FEV1","FVC"))
This function takes absolute spirometry measurements (FEV1, FVC, etc) in lt plus demographic data (age, height, gender and ethnicity) and converts them to percent (%) predicted based on the GLI-2012 equations.
pctpred_GLI( age, height, gender = 1, ethnicity = 1, FEV1 = NULL, FVC = NULL, FEV1FVC = NULL, FEF2575 = NULL, FEF75 = NULL, FEV075 = NULL, FEV075FVC = NULL )
pctpred_GLI( age, height, gender = 1, ethnicity = 1, FEV1 = NULL, FVC = NULL, FEV1FVC = NULL, FEF2575 = NULL, FEF75 = NULL, FEV075 = NULL, FEV075FVC = NULL )
age |
Age in years |
height |
Height in meters |
gender |
Gender (1 = male, 2 = female) or a factor with two levels (first = male). Default is 1. |
ethnicity |
Ethnicity (1 = Caucasian, 2 = African-American, 3 = NE Asian, 4 = SE Asian, 5 = Other/mixed). Default is 1. |
FEV1 |
Forced Expiratory Volume in 1 second (lt) |
FVC |
Forced Vital Capacity (lt) |
FEV1FVC |
FEV1 / FVC ratio |
FEF2575 |
Forced Expiratory Flow between 25% and 75% of FVC (lt/s) |
FEF75 |
Forced Expiratory Flow at 75% of FVC (lt/s) |
FEV075 |
Forced Expiratory Volume in 0.75 sec (lt) |
FEV075FVC |
FEV0.75 / FVC ratio |
At least one of the spirometric measurement 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
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.
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.
# Random data, 4 patients, one parameter supplied (FEV1) pctpred_GLI(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))
# Random data, 4 patients, one parameter supplied (FEV1) pctpred_GLI(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))
This function takes absolute diffusing capacity measurements (TLCO, KCO and VA) plus demographic data (age, height, gender) and converts them to percent (%) predicted based on the GLI (2017) equations.
pctpred_GLIdiff( age, height, gender = 1, TLCO = NULL, KCO = NULL, VA = NULL, SI = TRUE )
pctpred_GLIdiff( age, height, gender = 1, TLCO = NULL, KCO = NULL, VA = NULL, SI = TRUE )
age |
Age in years |
height |
Height in meters |
gender |
Gender (1 = male, 2 = female) or a factor with two levels (first = male). Default is 1. |
TLCO |
Transfer factor of the lung for carbon monoxide (in mmol/min/kPa if
|
KCO |
Transfer coefficient of the lung for carbon monoxide (in mmol/min/kPa/lt if
|
VA |
Alveolar volume (in lt) |
SI |
(default TRUE) Use SI (mmol/min/kPa) or traditional (ml/min/mmHg) units? |
At least one of the diffusing capacity 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
diffusing capacity 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.
If only one diffusing capacity 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.
# Random data, 4 patients, one parameter supplied (TLCO) pctpred_GLIdiff(age=seq(25,40,5), height=c(1.8, 1.9, 1.75, 1.85), gender=c(2,1,2,1), TLCO=c(7.8, 8.8, 7.5, 8.5))
# Random data, 4 patients, one parameter supplied (TLCO) pctpred_GLIdiff(age=seq(25,40,5), height=c(1.8, 1.9, 1.75, 1.85), gender=c(2,1,2,1), TLCO=c(7.8, 8.8, 7.5, 8.5))
This function takes absolute spirometry measurements (FEV1, FVC or FEV1FVC) in lt plus demographic data (age, height, gender) 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)
pctpred_GLIgl(age, height, gender = 1, FEV1 = NULL, FVC = NULL, FEV1FVC = NULL)
age |
Age in years |
height |
Height in meters |
gender |
Gender (1 = male, 2 = female) or a factor with two levels (first = male). Default is 1. |
FEV1 |
Forced Expiratory Volume in 1 second (lt) |
FVC |
Forced Vital Capacity (lt) |
FEV1FVC |
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.
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.
# 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))
# 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))
This function takes absolute spirometry measurements (FEV1, FVC, VC or FEV1FVC) in lt plus demographic data (age, height, gender) and converts them to percent (%) predicted based on the JRS (Japanese Respiratory Society 2014) equations.
pctpred_JRS( age, height, gender = 1, FEV1 = NULL, FVC = NULL, VC = NULL, FEV1FVC = NULL )
pctpred_JRS( age, height, gender = 1, FEV1 = NULL, FVC = NULL, VC = NULL, FEV1FVC = NULL )
age |
Age in years |
height |
Height in meters |
gender |
Gender (1 = male, 2 = female) or a factor with two levels (first = male). Default is 1. |
FEV1 |
Forced Expiratory Volume in 1 second (lt) |
FVC |
Forced Vital Capacity (lt) |
VC |
Vital Capacity (lt) |
FEV1FVC |
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.
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.
# Random data, 4 patients, one parameter supplied (FEV1) pctpred_JRS(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))
# Random data, 4 patients, one parameter supplied (FEV1) pctpred_JRS(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))
This function takes absolute spirometry measurements (FEV1, FVC, etc) in lt plus demographic data (age, height, gender and ethnicity) and converts them to percent (%) predicted based on the NHANES III equations.
pctpred_NHANES3( age, height, gender = 1, ethnicity = 1, FEV1 = NULL, FVC = NULL, FEV1FVC = NULL, PEF = NULL, FEF2575 = NULL, FEV6 = NULL, FEV1FEV6 = NULL )
pctpred_NHANES3( age, height, gender = 1, ethnicity = 1, FEV1 = NULL, FVC = NULL, FEV1FVC = NULL, PEF = NULL, FEF2575 = NULL, FEV6 = NULL, FEV1FEV6 = NULL )
age |
Age in years |
height |
Height in meters |
gender |
Gender (1 = male, 2 = female) or a factor with two levels (first = male). Default is 1. |
ethnicity |
Ethnicity (1 = Caucasian, 2 = African-American, 3 = Mexican-American). Default is 1. |
FEV1 |
Forced Expiratory Volume in 1 second (lt) |
FVC |
Forced Vital Capacity (lt) |
FEV1FVC |
FEV1 / FVC ratio |
PEF |
Peak Expiratory Flow (lt) |
FEF2575 |
Forced Expiratory Flow between 25% and 75% of FVC (lt/s) |
FEV6 |
Forced Expiratory Volume in 6 seconds (lt) |
FEV1FEV6 |
FEV1 / FEV6 ratio |
At least one of the spirometric measurement 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
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.
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.
# Random data, 4 patients, one parameter supplied (FEV1) pctpred_NHANES3(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))
# Random data, 4 patients, one parameter supplied (FEV1) pctpred_NHANES3(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))
This function calculates the mean normal (predicted) values for the various spirometry parameters, using the GLI-2012 equations. It accepts as input age, height, gender and ethnicity.
pred_GLI(age, height, gender = 1, ethnicity = 1, param = "FEV1")
pred_GLI(age, height, gender = 1, ethnicity = 1, param = "FEV1")
age |
Age in years |
height |
Height in meters |
gender |
Gender (1 = male, 2 = female) or a factor with two levels (first = male). Default is 1. |
ethnicity |
Ethnicity (1 = Caucasian, 2 = African-American, 3 = NE Asian, 4 = SE Asian, 5 = Other/mixed). Default is 1. |
param |
A character vector, containing one of more of the following parameters (case insensitive): "FEV1", "FVC", "FEV1FVC", "FEF2575", "FEF75", "FEV075", "FEV075FVC" |
Arguments age
, height
, gender
and ethnicity
are vectors
of equal length, or of length one, in which case the value is recycled; if the four vectors are
not of equal length, the function stops with an error.
If param
has length one, the function returns a numeric vector. If param
has length >1, it returns a data.frame with length(param)
columns.
# Find predicted FEV1 and FVC for Caucasian women aged 20 to 70 and with a height of 1.70 meters. pred_GLI(20:70, 1.7, 2, param=c("FEV1","FVC"))
# Find predicted FEV1 and FVC for Caucasian women aged 20 to 70 and with a height of 1.70 meters. pred_GLI(20:70, 1.7, 2, param=c("FEV1","FVC"))
This function calculates the mean normal (predicted) values for TLCO (transfer factor of the lung for carbon monoxide), KCO (transfer coefficient of the lung for carbon monoxide) and VA (alveolar volume) using the GLI (2017) equations. It accepts as input age, height and gender.
pred_GLIdiff(age, height, gender = 1, param = "TLCO", SI = TRUE)
pred_GLIdiff(age, height, gender = 1, param = "TLCO", SI = TRUE)
age |
Age in years |
height |
Height in meters |
gender |
Gender (1 = male, 2 = female) or a factor with two levels (first = male). Default is 1. |
param |
A character vector, containing one of more of the following parameters (case insensitive): "TLCO", "KCO" or "VA" |
SI |
(default TRUE) Use SI (mmol/min/kPa) or traditional (ml/min/mmHg) units? |
Arguments age
, height
and gender
are vectors
of equal length, or of length one, in which case the value is recycled; if the four vectors are
not of equal length, the function stops with an error.
If param
has length one, the function returns a numeric vector. If param
has length >1, it returns a data.frame with length(param)
columns.
# Find predicted TLCO and VA for women aged 20 to 70 and with a height of 1.70 meters. pred_GLIdiff(20:70, 1.7, 2, param=c("TLCO","VA"))
# Find predicted TLCO and VA for women aged 20 to 70 and with a height of 1.70 meters. pred_GLIdiff(20:70, 1.7, 2, param=c("TLCO","VA"))
This function calculates the mean normal (predicted) values for the various spirometry parameters, using the GLI global (2022) equations. It accepts as input age, height and gender.
pred_GLIgl(age, height, gender = 1, param = "FEV1")
pred_GLIgl(age, height, gender = 1, param = "FEV1")
age |
Age in years |
height |
Height in meters |
gender |
Gender (1 = male, 2 = female) or a factor with two levels (first = male). Default is 1. |
param |
A character vector, containing one of more of the following parameters (case insensitive): "FEV1", "FVC", "FEV1FVC" |
Arguments age
, height
and gender
are vectors
of equal length, or of length one, in which case the value is recycled; if the four vectors are
not of equal length, the function stops with an error.
If param
has length one, the function returns a numeric vector. If param
has length >1, it returns a data.frame with length(param)
columns.
# Find predicted FEV1 and FVC for women aged 20 to 70 and with a height of 1.70 meters. pred_GLIgl(20:70, 1.7, 2, param=c("FEV1","FVC"))
# Find predicted FEV1 and FVC for women aged 20 to 70 and with a height of 1.70 meters. pred_GLIgl(20:70, 1.7, 2, param=c("FEV1","FVC"))
This function calculates the mean normal (predicted) values for the various spirometry parameters, using the JRS (Japanese Respiratory Society 2014) equations. It accepts as input age, height and gender.
pred_JRS(age, height, gender = 1, param = "FEV1")
pred_JRS(age, height, gender = 1, param = "FEV1")
age |
Age in years |
height |
Height in meters |
gender |
Gender (1 = male, 2 = female) or a factor with two levels (first = male). Default is 1. |
param |
A character vector, containing one of more of the following parameters (case insensitive): "FEV1", "FVC", "VC", "FEV1FVC" |
Arguments age
, height
and gender
are vectors
of equal length, or of length one, in which case the value is recycled; if the four vectors are
not of equal length, the function stops with an error.
If param
has length one, the function returns a numeric vector. If param
has length >1, it returns a data.frame with length(param)
columns.
# Find predicted FEV1 and FVC for women aged 20 to 70 and with a height of 1.70 meters. pred_JRS(20:70, 1.7, 2, param=c("FEV1","FVC"))
# Find predicted FEV1 and FVC for women aged 20 to 70 and with a height of 1.70 meters. pred_JRS(20:70, 1.7, 2, param=c("FEV1","FVC"))
This function calculates the mean normal (predicted) values for the various spirometry parameters, using the NHANES III equations. It accepts as input age, height, gender and ethnicity.
pred_NHANES3(age, height, gender = 1, ethnicity = 1, param = "FEV1")
pred_NHANES3(age, height, gender = 1, ethnicity = 1, param = "FEV1")
age |
Age in years |
height |
Height in meters |
gender |
Gender (1 = male, 2 = female) or a factor with two levels (first = male). Default is 1. |
ethnicity |
Ethnicity (1 = Caucasian, 2 = African-American, 3 = Mexican-American). Default is 1. |
param |
A character vector, containing one of more of the following parameters (case insensitive): "FEV1", "FVC", "FEV1FVC", "PEF", "FEF2575", "FEV6", "FEV1FEV6" |
Arguments age
, height
, gender
and ethnicity
are vectors
of equal length, or of length one, in which case the value is recycled; if the four vectors are
not of equal length, the function stops with an error.
If param
has length one, the function returns a numeric vector. If param
has length >1, it returns a data.frame with length(param)
columns.
# Find predicted FEV1 and FVC for Caucasian women aged 20 to 70 and with a height of 1.70 meters. pred_NHANES3(20:70, 1.7, 2, param=c("FEV1","FVC"))
# Find predicted FEV1 and FVC for Caucasian women aged 20 to 70 and with a height of 1.70 meters. pred_NHANES3(20:70, 1.7, 2, param=c("FEV1","FVC"))
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 )
raw_GLI( age, height, gender = 1, ethnicity = 1, FEV1 = NULL, FVC = NULL, FEV1FVC = NULL, FEF2575 = NULL, FEF75 = NULL, FEV075 = NULL, FEV075FVC = NULL )
age |
Age in years |
height |
Height in meters |
gender |
Gender (1 = male, 2 = female) or a factor with two levels (first = male). Default is 1. |
ethnicity |
Ethnicity (1 = Caucasian, 2 = African-American, 3 = NE Asian, 4 = SE Asian, 5 = Other/mixed). Default is 1. |
FEV1 |
Forced Expiratory Volume in 1 second (z-score) |
FVC |
Forced Vital Capacity (z-score) |
FEV1FVC |
FEV1 / FVC (as z-score) |
FEF2575 |
Forced Expiratory Flow between 25% and 75% of FVC (z-score) |
FEF75 |
Forced Expiratory Flow at 75% of FVC (z-score) |
FEV075 |
Forced Expiratory Volume in 0.75 sec (z-score) |
FEV075FVC |
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.
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.
# 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))
# 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))
This function takes z-scores based on the GLI (2017) equations, plus demographic data (age, height and gender), and converts them back into absolute diffusing capacity measurements (TLCO, KCO and VA).
raw_GLIdiff( age, height, gender = 1, TLCO = NULL, KCO = NULL, VA = NULL, SI = TRUE )
raw_GLIdiff( age, height, gender = 1, TLCO = NULL, KCO = NULL, VA = NULL, SI = TRUE )
age |
Age in years |
height |
Height in meters |
gender |
Gender (1 = male, 2 = female) or a factor with two levels (first = male). Default is 1. |
TLCO |
Transfer factor of the lung for carbon monoxide (z-score) |
KCO |
Transfer coefficient of the lung for carbon monoxide (z-score) |
VA |
Alveolar volume (z-score) |
SI |
(default TRUE) Use SI (mmol/min/kPa) or traditional (ml/min/mmHg) units? |
At least one of the diffusing capacity z-score 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
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.
If only one diffusing capacity 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.
# Random data, 4 patients, one z-score parameter supplied (TLCO) raw_GLIdiff(age=seq(25,40,5), height=c(1.8, 1.9, 1.75, 1.85), gender=c(2,1,2,1), TLCO=c(-1.2, -1.9, 0, 0.5))
# Random data, 4 patients, one z-score parameter supplied (TLCO) raw_GLIdiff(age=seq(25,40,5), height=c(1.8, 1.9, 1.75, 1.85), gender=c(2,1,2,1), TLCO=c(-1.2, -1.9, 0, 0.5))
This function takes z-scores based on the GLI global (2022) equations, plus demographic data (age, height and gender), and converts them back into absolute spirometry measurements (FEV1, FVC, or FEV1FVC) in lt.
raw_GLIgl(age, height, gender = 1, FEV1 = NULL, FVC = NULL, FEV1FVC = NULL)
raw_GLIgl(age, height, gender = 1, FEV1 = NULL, FVC = NULL, FEV1FVC = NULL)
age |
Age in years |
height |
Height in meters |
gender |
Gender (1 = male, 2 = female) or a factor with two levels (first = male). Default is 1. |
FEV1 |
Forced Expiratory Volume in 1 second (z-score) |
FVC |
Forced Vital Capacity (z-score) |
FEV1FVC |
FEV1 / FVC (as z-score) |
At least one of the spirometric z-score 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
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.
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.
# Random data, 4 patients, one z-score parameter supplied (FEV1) raw_GLIgl(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))
# Random data, 4 patients, one z-score parameter supplied (FEV1) raw_GLIgl(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))
This function takes z-scores based on the JRS (Japanese Respiratory Society 2014) equations, plus demographic data (age, height and gender), and converts them back into absolute spirometry measurements (FEV1, FVC, VC, or FEV1FVC) in lt.
raw_JRS( age, height, gender = 1, FEV1 = NULL, FVC = NULL, VC = NULL, FEV1FVC = NULL )
raw_JRS( age, height, gender = 1, FEV1 = NULL, FVC = NULL, VC = NULL, FEV1FVC = NULL )
age |
Age in years |
height |
Height in meters |
gender |
Gender (1 = male, 2 = female) or a factor with two levels (first = male). Default is 1. |
FEV1 |
Forced Expiratory Volume in 1 second (z-score) |
FVC |
Forced Vital Capacity (z-score) |
VC |
Vital Capacity (z-score) |
FEV1FVC |
FEV1 / FVC (as z-score) |
At least one of the spirometric z-score 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
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.
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.
# Random data, 4 patients, one z-score parameter supplied (FEV1) raw_JRS(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))
# Random data, 4 patients, one z-score parameter supplied (FEV1) raw_JRS(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))
This function takes absolute spirometry measurements (FEV1, FVC, etc) in lt plus demographic data (age, height, gender and ethnicity) and converts them to z-scores based on the GLI-2012 equations.
zscore_GLI( age, height, gender = 1, ethnicity = 1, FEV1 = NULL, FVC = NULL, FEV1FVC = NULL, FEF2575 = NULL, FEF75 = NULL, FEV075 = NULL, FEV075FVC = NULL )
zscore_GLI( age, height, gender = 1, ethnicity = 1, FEV1 = NULL, FVC = NULL, FEV1FVC = NULL, FEF2575 = NULL, FEF75 = NULL, FEV075 = NULL, FEV075FVC = NULL )
age |
Age in years |
height |
Height in meters |
gender |
Gender (1 = male, 2 = female) or a factor with two levels (first = male). Default is 1. |
ethnicity |
Ethnicity (1 = Caucasian, 2 = African-American, 3 = NE Asian, 4 = SE Asian, 5 = Other/mixed). Default is 1. |
FEV1 |
Forced Expiratory Volume in 1 second (lt) |
FVC |
Forced Vital Capacity (lt) |
FEV1FVC |
FEV1 / FVC |
FEF2575 |
Forced Expiratory Flow between 25% and 75% of FVC (lt/s) |
FEF75 |
Forced Expiratory Flow at 75% of FVC (lt/s) |
FEV075 |
Forced Expiratory Volume in 0.75 sec (lt) |
FEV075FVC |
FEV0.75 / FVC |
At least one of the spirometric measurement 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
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.
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.
# Random data, 4 patients, one parameter supplied (FEV1) zscore_GLI(age=seq(25,40,4), height=c(1.8, 1.9, 1.75, 1.85), gender=c(2,1,2,1), ethnicity=rep(1,4), FEV1=c(3.5, 4, 3.6, 3.9))
# Random data, 4 patients, one parameter supplied (FEV1) zscore_GLI(age=seq(25,40,4), height=c(1.8, 1.9, 1.75, 1.85), gender=c(2,1,2,1), ethnicity=rep(1,4), FEV1=c(3.5, 4, 3.6, 3.9))
This function takes absolute diffusing capacity measurements (TLCO, KCO and VA) plus demographic data (age, height and gender) and converts them to z-scores based on the GLI (2017) equations.
zscore_GLIdiff( age, height, gender = 1, TLCO = NULL, KCO = NULL, VA = NULL, SI = TRUE )
zscore_GLIdiff( age, height, gender = 1, TLCO = NULL, KCO = NULL, VA = NULL, SI = TRUE )
age |
Age in years |
height |
Height in meters |
gender |
Gender (1 = male, 2 = female) or a factor with two levels (first = male). Default is 1. |
TLCO |
Transfer factor of the lung for carbon monoxide (in mmol/min/kPa if
|
KCO |
Transfer coefficient of the lung for carbon monoxide (in mmol/min/kPa/lt if
|
VA |
Alveolar volume (in lt) |
SI |
(default TRUE) Use SI (mmol/min/kPa) or traditional (ml/min/mmHg) units? |
At least one of the diffusing capacity 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
diffusing capacity 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.
If only one diffusing capacity 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.
# Random data, 4 patients, one parameter supplied (TLCO) zscore_GLIdiff(age=seq(25,40,5), height=c(1.8, 1.9, 1.75, 1.85), gender=c(2,1,2,1), TLCO=c(7.8, 8.8, 7.5, 8.5))
# Random data, 4 patients, one parameter supplied (TLCO) zscore_GLIdiff(age=seq(25,40,5), height=c(1.8, 1.9, 1.75, 1.85), gender=c(2,1,2,1), TLCO=c(7.8, 8.8, 7.5, 8.5))
This function takes absolute spirometry measurements (FEV1, FVC, FEV1/FVC) in lt plus demographic data (age, height and gender) and converts them to z-scores based on the GLI global (2022) equations.
zscore_GLIgl(age, height, gender = 1, FEV1 = NULL, FVC = NULL, FEV1FVC = NULL)
zscore_GLIgl(age, height, gender = 1, FEV1 = NULL, FVC = NULL, FEV1FVC = NULL)
age |
Age in years |
height |
Height in meters |
gender |
Gender (1 = male, 2 = female) or a factor with two levels (first = male). Default is 1. |
FEV1 |
Forced Expiratory Volume in 1 second (lt) |
FVC |
Forced Vital Capacity (lt) |
FEV1FVC |
FEV1 / FVC |
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.
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.
# Random data, 4 patients, one parameter supplied (FEV1) zscore_GLI(age=seq(25,40,4), 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))
# Random data, 4 patients, one parameter supplied (FEV1) zscore_GLI(age=seq(25,40,4), 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))
This function takes absolute spirometry measurements (FEV1, FVC, VC, FEV1/FVC) in lt plus demographic data (age, height and gender) and converts them to z-scores based on the JRS (Japanese Respiratory Society 2014) equations.
zscore_JRS( age, height, gender = 1, FEV1 = NULL, FVC = NULL, VC = NULL, FEV1FVC = NULL )
zscore_JRS( age, height, gender = 1, FEV1 = NULL, FVC = NULL, VC = NULL, FEV1FVC = NULL )
age |
Age in years |
height |
Height in meters |
gender |
Gender (1 = male, 2 = female) or a factor with two levels (first = male). Default is 1. |
FEV1 |
Forced Expiratory Volume in 1 second (lt) |
FVC |
Forced Vital Capacity (lt) |
VC |
Vital Capacity (lt) |
FEV1FVC |
FEV1 / FVC |
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.
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.
# Random data, 4 patients, one parameter supplied (FEV1) zscore_JRS(age=seq(25,40,4), 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))
# Random data, 4 patients, one parameter supplied (FEV1) zscore_JRS(age=seq(25,40,4), 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))
This function takes absolute spirometry measurements (FEV1, FVC, etc) in lt plus demographic data (age, height, gender and ethnicity) and converts them to z-scores based on the NHANES III equations.
zscore_NHANES3( age, height, gender = 1, ethnicity = 1, FEV1 = NULL, FVC = NULL, FEV1FVC = NULL, PEF = NULL, FEF2575 = NULL, FEV6 = NULL, FEV1FEV6 = NULL )
zscore_NHANES3( age, height, gender = 1, ethnicity = 1, FEV1 = NULL, FVC = NULL, FEV1FVC = NULL, PEF = NULL, FEF2575 = NULL, FEV6 = NULL, FEV1FEV6 = NULL )
age |
Age in years |
height |
Height in meters |
gender |
Gender (1 = male, 2 = female) or a factor with two levels (first = male). Default is 1. |
ethnicity |
Ethnicity (1 = Caucasian, 2 = African-American, 3 = Mexican-American). Default is 1. |
FEV1 |
Forced Expiratory Volume in 1 second (lt) |
FVC |
Forced Vital Capacity (lt) |
FEV1FVC |
FEV1 / FVC ratio |
PEF |
Peak Expiratory Flow (lt) |
FEF2575 |
Forced Expiratory Flow between 25% and 75% of FVC (lt/s) |
FEV6 |
Forced Expiratory Volume in 6 seconds (lt) |
FEV1FEV6 |
FEV1 / FEV6 ratio |
At least one of the spirometric measurement 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
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.
Normal distributions are assumed for all parameters, even though per the NHANES III equations paper (Hankinson et al) this was observed only for FEV1, FVC, PEF and FEV6.
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.
# Random data, 4 patients, one parameter supplied (FEV1) zscore_NHANES3(age=seq(25,40,4), height=c(1.8, 1.9, 1.75, 1.85), gender=c(2,1,2,1), ethnicity=rep(1,4), FEV1=c(3.5, 4, 3.6, 3.9))
# Random data, 4 patients, one parameter supplied (FEV1) zscore_NHANES3(age=seq(25,40,4), height=c(1.8, 1.9, 1.75, 1.85), gender=c(2,1,2,1), ethnicity=rep(1,4), FEV1=c(3.5, 4, 3.6, 3.9))