pctpred_GLIdiff {rspiro}R Documentation

Convert diffusing capacity values to % predicted using GLI (2017) equations

Description

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.

Usage

pctpred_GLIdiff(
  age,
  height,
  gender = 1,
  TLCO = NULL,
  KCO = NULL,
  VA = NULL,
  SI = TRUE
)

Arguments

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 SI=TRUE or ml/min/mmHg if SI=FALSE)

KCO

Transfer coefficient of the lung for carbon monoxide (in mmol/min/kPa/lt if SI=TRUE or ml/min/mmHg/lt if SI=FALSE)

VA

Alveolar volume (in lt)

SI

(default TRUE) Use SI (mmol/min/kPa) or traditional (ml/min/mmHg) units?

Details

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.

Value

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.

Examples

# 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))


[Package rspiro version 0.5 Index]