compute_egfr(
creat = 90, creatu = "umol/L", age = 53, weight = 85, sex = "M", method = "CRCL"
)
compute_egfr(
creat = 90, creatu = "umol/L", age = 53, sex = "M", race = "ASIAN", method = "MDRD"
)
compute_egfr(
creat = 70, creatu = "umol/L", age = 52, sex = "F", race = "BLACK OR AFRICAN AMERICAN",
method = "MDRD"
)
compute_egfr(
creat = 90, creatu = "umol/L", age = 53, sex = "M", method = "CKD-EPI"
)
base <- tibble::tribble(
~STUDYID, ~USUBJID, ~AGE, ~SEX, ~RACE, ~WTBL, ~CREATBL, ~CREATBLU,
"P01", "P01-1001", 55, "M", "WHITE", 90.7, 96.3, "umol/L",
"P01", "P01-1002", 52, "F", "BLACK OR AFRICAN AMERICAN", 68.5, 70, "umol/L",
"P01", "P01-1003", 67, "M", "BLACK OR AFRICAN AMERICAN", 85.0, 77, "umol/L",
"P01", "P01-1004", 76, "F", "ASIAN", 60.7, 65, "umol/L",
)
base %>%
dplyr::mutate(
CRCL_CG = compute_egfr(
creat = CREATBL, creatu = CREATBLU, age = AGE, weight = WTBL, sex = SEX,
method = "CRCL"
),
EGFR_EPI = compute_egfr(
creat = CREATBL, creatu = CREATBLU, age = AGE, weight = WTBL, sex = SEX,
method = "CKD-EPI"
),
EGFR_MDRD = compute_egfr(
creat = CREATBL, creatu = CREATBLU, age = AGE, weight = WTBL, sex = SEX,
race = RACE, method = "MDRD"
),
)
Run the code above in your browser using DataLab