calculate_egfr_ekfc: Calculate estimated GFR, European Kidney Function Consortium...

calculate_egfr_ekfcR Documentation

Calculate estimated GFR, European Kidney Function Consortium (EKFC) 2021 formula

Description

Calculates the European Kidney Function Consortium (EKFC) 2021 formula estimated glomerular filtration rate. Methods described in Pottel et al, Annals Int Med. 2021. An online calculator is found here.

Usage

calculate_egfr_ekfc(age, sex, creatinine, creatinine_units = "mg/dL")

Arguments

age

Age, in years

sex

Sex

creatinine

Serum Creatinine, mg/dL

creatinine_units

Creatinine units, if different than mg/dL

Value

a numeric vector with eGFR (ml/min/1.73m^2)

Examples

# CKD-EPI 2021 version (new race-free creatinine-based equation)
# https://www.kidney.org/professionals/kdoqi/gfr_calculator
calculate_egfr_ckdepi(age=50, sex="Male", creatinine=0.6) # 95.2
calculate_egfr_ckdepi(age=70, sex="Male", creatinine=0.8, version = "2021") # 95.2
calculate_egfr_ckdepi(age=70, sex="Female", creatinine=0.8, version = "2021") # 95.2

# KRS 2023 version : transplant specific
calculate_egfr_krs(age=50, sex="Male", creatinine=1)
calculate_egfr_krs(age=50, sex="Female", creatinine=1)
calculate_egfr_krs(age=75, sex="Male", creatinine=1)
calculate_egfr_krs(age=75, sex="Female", creatinine=1)

# EKFC 2021: 
calculate_egfr_ekfc(1.2, age=50, sex="Male")
calculate_egfr_ekfc(1.2, age=19, sex="Ma")
calculate_egfr_ekfc(1.2, age=15, sex="male")

calculate_egfr_ekfc(1.2, age=50, sex="fe")
calculate_egfr_ekfc(1.2, age=19, sex="Female")
calculate_egfr_ekfc(1.2, age=15, sex="FE")
calculate_egfr_ekfc(1.2, age=10, sex="FEMALE")
calculate_egfr_ekfc(1.2, age=5, sex="Female")

# original has been vectorized to handle multiple results
data.frame(age=c(5,10,15,35, 50), 
sex=rep("Male",5),
creatinine=rep(1.2,5)) |> 
dplyr::mutate(egfr=calculate_egfr_ekfc(creatinine, age, sex))

JMLuther/tabletools documentation built on April 14, 2025, 3:09 a.m.