Skip to contents

[Experimental]

Usage

leo_eGFR_v2009(
  gender,
  age,
  creatinine,
  creatinine_unit = c("umol/L", "mg/dL"),
  ...
)

Arguments

gender

Numeric/character vector for sex, usually from UKB field p31 (0 = Female, 1 = Male).

age

Numeric/character vector for age in years, usually from UKB field p21003.

creatinine

Numeric/character vector for serum creatinine, usually from UKB field p30700.

creatinine_unit

Unit of creatinine, either "umol/L" (UKB default) or "mg/dL".

...

Reserved for future use.

Value

Numeric vector of eGFR values (mL/min/1.73m^2).

Details

Estimate glomerular filtration rate (eGFR, mL/min/1.73m^2) using the 2009 CKD-EPI creatinine equation with sex-specific coefficients. This implementation follows the sex-only form commonly used in teaching code and does not apply the historical race coefficient.

Note

UK Biobank-friendly inputs are p31, p21003_i0, and p30700_i0. When creatinine_unit = "umol/L" (default), creatinine is converted internally to mg/dL by dividing by 88.4. Use age and creatinine from the same assessment instance when possible. This function is currently untested on real UKB export files.

Examples

leo_eGFR_v2009(gender = c(1, 0), age = c(45, 62), creatinine = c(78.5, 92.3))
#>  Calculating eGFR using CKD-EPI 2009 (umol/L -> mg/dL if needed)
#>  [10:00:39] eGFR v2009 finished for 2 records
#> [1] 103.35451  57.26322