egfr.Rd
Calculates eGFR based on the method specified
egfr(sexf, raceb, age, creat, cystc, height, method = "CKDEPI 2009")
a boolean representing if the patient is female.
a boolean representing if the patient is black.
the age of a patient in years.
the serum creatinine levels in mg/dL.
the cystatin C levels in mg/L - only used in CKDEPI 2021 cystatin method
the height of a patient in cm.
a string specifying the method to use. Available options are "CKDEPI 2009", "MDRD", "CKDEPI 2021", "Schwartz".
the eGFR calculated based on method.
e <- egfr(TRUE, TRUE, 24, 1, "CKDEPI 2009")
df <- data.frame(
"SEXF" = c(TRUE, FALSE, TRUE, FALSE),
"RACEB" = c(FALSE, FALSE, TRUE, FALSE),
"AGE" = c(24, 24, 23, 24),
"CREAT" = c(1, 1, 2, 1)
)
df <- dplyr::mutate(df, egfr = egfr(SEXF, RACEB, AGE, CREAT, "CKDEPI 2009"))
df
#> SEXF RACEB AGE CREAT egfr
#> 1 TRUE FALSE 24 1 78.79023
#> 2 FALSE FALSE 24 1 104.87700
#> 3 TRUE TRUE 23 2 39.77968
#> 4 FALSE FALSE 24 1 104.87700