Title: Kidney-Related Functions for Clinical and Epidemiological Research
Version: 1.4.0
Maintainer: Boris Bikbov <boris.bikbov@scientific-tools.org>
Description: Contains kidney care oriented functions. Current version contains functions for calculation of: - Estimated glomerular filtration rate by CKD-EPI (2021 and 2009), MDRD, CKiD, FAS, EKFC, etc. - Kidney Donor Risk Index and Kidney Donor Profile Index for kidney transplant donors. - Citation: Bikbov B. kidney.epi: Kidney-Related Functions for Clinical and Epidemiological Research. Scientific-Tools.Org, https://Scientific-Tools.Org. <doi:10.32614/CRAN.package.kidney.epi>.
Depends: R (≥ 3.4.0)
License: LGPL-2 | LGPL-2.1 | LGPL-3 [expanded from: LGPL (≥ 2)]
URL: https://Scientific-Tools.Org/, https://www.linkedin.com/in/boris-bikbov/, https://kidney.Scientific-Tools.Org/r/
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.3.2
Imports: readxl, openxlsx, purrr
Suggests: knitr, rmarkdown
VignetteBuilder: knitr
NeedsCompilation: no
Packaged: 2025-05-31 16:24:27 UTC; BB2
Author: Boris Bikbov ORCID iD [aut, cre]
Repository: CRAN
Date/Publication: 2025-05-31 17:00:03 UTC

A synthetic dataset contains variables for eGFR calculation.

Description

A synthetic dataset contains variables for eGFR calculation for 1000 adults and 1000 children.

Usage

ckd.data

Format

A data frame with 2000 rows (1000 adults and 1000 children/young adults) and 12 variables:

cr

Serum creatinine, micromol/L

cys

Serum cystatin C, mg/L

age

Age, years

sex

Sex

ethnicity

Ethnicity

height

Height, cm

category

Indication on whether the generated data refer to adults or children

Details

Citation: Bikbov B. kidney.epi: Kidney-Related Functions for Clinical and Epidemiological Research. Scientific-Tools.Org, https://Scientific-Tools.Org. DOI: 10.32614/CRAN.package.kidney.epi

Source

Synthetic dataset was generated based on two publications:


Calculate KDIGO albuminuria categories

Description

Calculate KDIGO albuminuria categories

Usage

ckd.kdigo_category.albuminuria(
  albuminuria,
  albuminuria_units = "mg/g",
  semiquantitative_values = "forbidden"
)

Arguments

albuminuria

Numeric vector. Urine albumin, could be expressed in "mg/day" (24-hour urine collection), "mg/mmol" (UACR) or "mg/g" (UACR). Units of measurement should be defined in variable albuminuria_units (if not defined explicitly by user, the default value is "mg/g").

albuminuria_units

Character string. Units in which urine albumin is measured. Could be one of the following: "mg/day", "mg/mmol" or "mg/g".

semiquantitative_values

Character string. Defines whether semiquantitative values are allowed in the data. If "any", all semiquantitative values ('<30', '30-300', '>300') and any numeric values (29, 30, 35, etc) will be classified into A categories (NB! both '30-300' and '30-299' will be classified as A2). If "only_limits", only limiting semiquantitative values ('<30', '>300') will be classified into A categories, but middle semiquantitative values ('30-300') will be omitted; but numeric values (29, 30, 35, etc) will be classified into A categories. If "forbidden", only numeric values will be classified into A categories.

Details

Calculate albuminuria categories (A1, A2, A3) based on albuminuria values.

Citation: Bikbov B. kidney.epi: Kidney-Related Functions for Clinical and Epidemiological Research. Scientific-Tools.Org, https://Scientific-Tools.Org. DOI: 10.32614/CRAN.package.kidney.epi

Value

string albuminuria category.

Author(s)

Programming: Boris Bikbov https://www.linkedin.com/in/boris-bikbov.

Examples

# for a single patient
ckd.kdigo_category.albuminuria(albuminuria = 25, albuminuria_units = "mg/g")
# for a dataset - see vignettes for details
# ckd.kdigo_category.albuminuria(albuminuria = dta$alb, albuminuria_units = "mg/g")

Calculate eGFR categories

Description

Calculate eGFR categories

Usage

ckd.kdigo_category.gfr(gfr)

Arguments

gfr

Numeric vector. eGFR, expressed in "ml/min/1.73m2".

Details

Calculate eGFR categories (G1, G2, G3a, G3b, G4, G5) based on eGFR values.

Citation: Bikbov B. kidney.epi: Kidney-Related Functions for Clinical and Epidemiological Research. Scientific-Tools.Org, https://Scientific-Tools.Org. DOI: 10.32614/CRAN.package.kidney.epi

Value

string gfr category.

Author(s)

Programming: Boris Bikbov https://www.linkedin.com/in/boris-bikbov.

Examples

# for a single patient
ckd.kdigo_category.gfr(gfr = 25)
# for a dataset - see vignettes for details
# ckd.kdigo_category.gfr(gfr = dta$egfr)

Calculate proteinuria categories

Description

Calculate proteinuria categories

Usage

ckd.kdigo_category.proteinuria(
  proteinuria,
  proteinuria_units = "mg/g",
  semiquantitative_values = "forbidden"
)

Arguments

proteinuria

Numeric vector. Urine protein, could be expressed in "mg/day" (24-hour urine collection), "mg/mmol" (UPCR) or "mg/g" (UPCR). Units of measurement should be defined in variable proteinuria_units (if not defined explicitly by user, the default value is "mg/g").

proteinuria_units

Character string. Units in which urine protein is measured. Could be one of the following: "mg/day", "mg/mmol" or "mg/g".

semiquantitative_values

Character string. Defines whether semiquantitative values are allowed in the data. If "any", all semiquantitative values ('<30', '30-300', '>300') and any numeric values (29, 30, 35, etc) will be classified into A categories (NB! both '30-300' and '30-299' will be classified as A2). If "only_limits", only limiting semiquantitative values ('<30', '>300') will be classified into A categories, but middle semiquantitative values ('30-300') will be omitted; but numeric values (29, 30, 35, etc) will be classified into A categories. If "forbidden", only numeric values will be classified into A categories.

Details

Calculate albuminuria categories (A1, A2, A3) based on proteinuria values.

Citation: Bikbov B. kidney.epi: Kidney-Related Functions for Clinical and Epidemiological Research. Scientific-Tools.Org, https://Scientific-Tools.Org. DOI: 10.32614/CRAN.package.kidney.epi

Value

string albuminuria category.

Author(s)

Programming: Boris Bikbov https://www.linkedin.com/in/boris-bikbov.

Examples

# for a single patient
ckd.kdigo_category.proteinuria(proteinuria = 25, proteinuria_units = "mg/g")
# for a dataset - see vignettes for details
# ckd.kdigo_category.proteinuria(proteinuria = dta$alb, proteinuria_units = "mg/g")

Calculate KDIGO risk categories

Description

Calculate KDIGO risk categories

Usage

ckd.kdigo_category.risk(gfr_cat, alb_cat)

Arguments

gfr_cat

Character vector. eGFR categories coded as G1, G2, G3a, G3b, G4, G5.

alb_cat

Character vector. Albuminuria categories coded as A1, A2, A3.

Details

Calculate KDIGO risk of complications categories (Low, Moderate, High, Very high) based on eGFR and albuminuria grades.

Citation: Bikbov B. kidney.epi: Kidney-Related Functions for Clinical and Epidemiological Research. Scientific-Tools.Org, https://Scientific-Tools.Org. DOI: 10.32614/CRAN.package.kidney.epi

Value

string risk category.

Author(s)

Programming: Boris Bikbov https://www.linkedin.com/in/boris-bikbov.

Examples

# for a single patient
ckd.kdigo_category.risk(gfr_cat = "G2", alb_cat = "A3")
# for a dataset - see vignettes for details
# ckd.kdigo_category.risk(gfr_cat = dta$gfr_cat, alb_cat = dta$alb_cat)

Calculate eGFR by all creatinine-based equations for adults

Description

Calculate eGFR by all creatinine-based equations for adults

Usage

egfr.all_adults.cr(
  creatinine,
  age,
  sex,
  ethnicity = NA,
  creatinine_units = "micromol/l",
  label_sex_male = c("Male", 1),
  label_sex_female = c("Female", 0),
  label_african = c("Afroamerican"),
  max_age = 100
)

Arguments

creatinine

Numeric vector. Serum creatinine, could be expressed in "micromol/L", "mmol/L" or "mg/dL". Units of measurement should be defined in variable creatinine_units (if not defined explicitly by user, the default value is "micromol/L").

age

Numeric vector. Age, in years.

sex

Vector. The value of variable refers to the parameters label_sex_male and label_sex_female.

ethnicity

Vector. Ethnicity. If no ethnicity will be defined, the calculation will use coefficients for Caucasian subjects. Specify ethnicity labels in the function parameter label_african.

creatinine_units

Character string. Units in which serum creatinine is expressed. Could be one of the following: "micromol/L", "mmol/L" or "mg/dL".

label_sex_male

List. Label(s) for definition(s) of male sex.

label_sex_female

List. Label(s) for definition(s) of female sex.

label_african

List. Label(s) for African ethnicity. Required only by race-specific equations.

max_age

Numeric. Maximal age suitable for the equation application, in years. By default is 100 years, but change this value in case you would like to apply equation to older persons.

Details

Calculate eGFR by all creatinine-based equations for adults available in the kidney.epi package.

References to the equations are available in single functions of the kidney.epi package.

Citation: Bikbov B. kidney.epi: Kidney-Related Functions for Clinical and Epidemiological Research. Scientific-Tools.Org, https://Scientific-Tools.Org. DOI: 10.32614/CRAN.package.kidney.epi

Value

numeric eGFR expressed in ml/min/1.73m2.

Author(s)

Programming: Boris Bikbov https://www.linkedin.com/in/boris-bikbov.

Examples

# for a single patient
egfr.all_adults.cr (creatinine = 1.4, age = 60, sex = "Male", 
  creatinine_units = "mg/dl")
# for a dataset - see vignettes for details
# egfr.all_adults.cr (creatinine = dta$scr, age = dta$age, sex = dta$sex, 
#  creatinine_units = "mg/dl")

Calculate eGFR by all creatinine-cystatin-based equations for adults

Description

Calculate eGFR by all creatinine-cystatin-based equations for adults

Usage

egfr.all_adults.cr_cys(
  creatinine,
  cystatin,
  age,
  sex,
  creatinine_units = "micromol/l",
  cystatin_units = "mg/L",
  label_sex_male = c("Male", 1),
  label_sex_female = c("Female", 0),
  max_age = 100
)

Arguments

creatinine

Numeric vector. Serum creatinine, could be expressed in "micromol/L", "mmol/L" or "mg/dL". Units of measurement should be defined in variable creatinine_units (if not defined explicitly by user, the default value is "micromol/L").

cystatin

Numeric vector. Serum cystatin, could be expressed in "mg/L" or "nanomol/L". Units of measurement should be defined in variable cystatin_units (if not defined explicitly by user, the default value is "mg/L").

age

Numeric vector. Age, in years.

sex

Vector. The value of variable refers to the parameters label_sex_male and label_sex_female.

creatinine_units

Character string. Units in which serum creatinine is expressed. Could be one of the following: "micromol/L", "mmol/L" or "mg/dL".

cystatin_units

Character string. Units in which serum cystatin is expressed. Could be one of the following: "mg/L" or "nanomol/L"

label_sex_male

List. Label(s) for definition(s) of male sex.

label_sex_female

List. Label(s) for definition(s) of female sex.

max_age

Numeric. Maximal age suitable for the equation application, in years. By default is 100 years, but change this value in case you would like to apply equation to older persons.

Details

Calculate eGFR by all creatinine-cystatin-based equations for adults available in the kidney.epi package.

References to the equations are available in single functions of the kidney.epi package.

Citation: Bikbov B. kidney.epi: Kidney-Related Functions for Clinical and Epidemiological Research. Scientific-Tools.Org, https://Scientific-Tools.Org. DOI: 10.32614/CRAN.package.kidney.epi

Value

numeric eGFR expressed in ml/min/1.73m2.

Author(s)

Programming: Boris Bikbov https://www.linkedin.com/in/boris-bikbov.


Calculate eGFR by all cystatin-based equations for adults

Description

Calculate eGFR by all cystatin-based equations for adults

Usage

egfr.all_adults.cys(cystatin, age, cystatin_units = "mg/L", max_age = 100)

Arguments

cystatin

Numeric vector. Serum cystatin, could be expressed in "mg/L" or "nanomol/L". Units of measurement should be defined in variable cystatin_units (if not defined explicitly by user, the default value is "mg/L").

age

Numeric vector. Age, in years.

cystatin_units

Character string. Units in which serum cystatin is expressed. Could be one of the following: "mg/L" or "nanomol/L"

max_age

Numeric. Maximal age suitable for the equation application, in years. By default is 100 years, but change this value in case you would like to apply equation to older persons.

Details

Calculate eGFR by all cystatin-based equations for adults available in the kidney.epi package.

References to the equations are available in single functions of the kidney.epi package.

Citation: Bikbov B. kidney.epi: Kidney-Related Functions for Clinical and Epidemiological Research. Scientific-Tools.Org, https://Scientific-Tools.Org. DOI: 10.32614/CRAN.package.kidney.epi

Value

numeric eGFR expressed in ml/min/1.73m2.

Author(s)

Programming: Boris Bikbov https://www.linkedin.com/in/boris-bikbov.

Examples

# for a single patient
egfr.all_adults.cys (cystatin = 1.4, age = 60,
  cystatin_units = "mg/L")
# for a dataset - see vignettes for details
# egfr.all_adults.cys (cystatin = dta$cys, age = dta$age, 
#  cystatin_units = "mg/L")

Calculate eGFR by the Berlin Initiative Study (BIS1) creatinine-based equation

Description

Calculate eGFR by the Berlin Initiative Study (BIS1) creatinine-based equation

Usage

egfr.bis.cr(
  creatinine,
  age,
  sex,
  creatinine_units = "micromol/l",
  label_sex_male = c("Male", 1),
  label_sex_female = c("Female", 0),
  max_age = 100
)

Arguments

creatinine

Numeric vector. Serum creatinine, could be expressed in "micromol/L", "mmol/L" or "mg/dL". Units of measurement should be defined in variable creatinine_units (if not defined explicitly by user, the default value is "micromol/L").

age

Numeric vector. Age, in years.

sex

Vector. The value of variable refers to the parameters label_sex_male and label_sex_female.

creatinine_units

Character string. Units in which serum creatinne is expressed. Could be one of the following: "micromol/L", "mmol/L" or "mg/dL".

label_sex_male

List. Label(s) for definition(s) of male sex.

label_sex_female

List. Label(s) for definition(s) of female sex.

max_age

Numeric. Maximal age suitable for the equation application, in years. By default is 100 years, but change this value in case you would like to apply equation to older persons.

Details

Calculate estimated glomerular filtration rate (eGFR) by the Berlin Initiative Study (BIS1) creatinine-based equation.

Reference to the equation: Schaeffner ES, Ebert N, Delanaye P et al. Two novel equations to estimate kidney function in persons aged 70 years or older. Ann Intern Med 2012; 157: 471–481 doi: 10.7326/0003-4819-157-7-201210020-00003.

Citation: Bikbov B. kidney.epi: Kidney-Related Functions for Clinical and Epidemiological Research. Scientific-Tools.Org, https://Scientific-Tools.Org. DOI: 10.32614/CRAN.package.kidney.epi

Value

numeric eGFR expressed in ml/min/1.73m2.

Author(s)

Programming: Boris Bikbov https://www.linkedin.com/in/boris-bikbov.

Examples

# for a single patient
egfr.bis.cr (creatinine = 1.4, age = 80, sex = "Male", 
  creatinine_units = "mg/dl")
# for a dataset - see vignettes for details
# egfr.bis.cr (creatinine = dta$scr, age = dta$age, sex = dta$sex, 
#  creatinine_units = "mg/dl")

Calculate eGFR by the Berlin Initiative Study (BIS2) creatinine-cystatin C-based equation

Description

Calculate eGFR by the Berlin Initiative Study (BIS2) creatinine-cystatin C-based equation

Usage

egfr.bis.cr_cys(
  creatinine,
  cystatin,
  age,
  sex,
  creatinine_units = "micromol/l",
  cystatin_units = "mg/l",
  label_sex_male = c("Male", 1),
  label_sex_female = c("Female", 0),
  max_age = 100
)

Arguments

creatinine

Numeric vector. Serum creatinine, could be expressed in "micromol/L", "mmol/L" or "mg/dL". Units of measurement should be defined in variable creatinine_units (if not defined explicitly by user, the default value is "micromol/L").

cystatin

Numeric vector. Serum cystatin, could be expressed in "mg/L" or "nanomol/L". Units of measurement should be defined in variable cystatin_units (if not defined explicitly by user, the default value is "mg/L").

age

Numeric vector. Age, in years.

sex

Vector. The value of variable refers to the parameters label_sex_male and label_sex_female.

creatinine_units

Character string. Units in which serum creatinne is expressed. Could be one of the following: "micromol/L", "mmol/L" or "mg/dL".

cystatin_units

Character string. Units in which serum cystatin is expressed. Could be one of the following: "mg/L" or "nanomol/L"

label_sex_male

List. Label(s) for definition(s) of male sex.

label_sex_female

List. Label(s) for definition(s) of female sex.

max_age

Numeric. Maximal age suitable for the equation application, in years. By default is 100 years, but change this value in case you would like to apply equation to older persons.

Details

Calculate estimated glomerular filtration rate (eGFR) by the Berlin Initiative Study (BIS2) creatinine-cystatin C-based equation.

Reference to the equation: Schaeffner ES, Ebert N, Delanaye P et al. Two novel equations to estimate kidney function in persons aged 70 years or older. Ann Intern Med 2012; 157: 471–481 doi: 10.7326/0003-4819-157-7-201210020-00003.

Citation: Bikbov B. kidney.epi: Kidney-Related Functions for Clinical and Epidemiological Research. Scientific-Tools.Org, https://Scientific-Tools.Org. DOI: 10.32614/CRAN.package.kidney.epi

Value

numeric eGFR expressed in ml/min/1.73m2.

Author(s)

Programming: Boris Bikbov https://www.linkedin.com/in/boris-bikbov.

Examples

# for a single patient
egfr.bis.cr_cys (creatinine = 1.4, cystatin = 1.0, age = 80,
   sex = "Male", creatinine_units = "mg/dl",
   cystatin_units = "mg/L")
# for a dataset - see vignettes for details
# egfr.bis.cr_cys (creatinine = dta$scr, cystatin = dta$cys, 
#   age = dta$age, sex = dta$sex, 
#   creatinine_units = "mg/dl", cystatin_units = "mg/l")

Calculate creatinine clearance by the Cockcroft-Gault equation

Description

Calculate creatinine clearance by the Cockcroft-Gault equation

Usage

egfr.cg.cr(
  creatinine,
  age,
  sex,
  weight,
  creatinine_units = "micromol/l",
  label_sex_male = c("Male", 1),
  label_sex_female = c("Female", 0),
  max_age = 100
)

Arguments

creatinine

Numeric vector. Serum creatinine, could be expressed in "micromol/L", "mmol/L" or "mg/dL". Units of measurement should be defined in variable creatinine_units (if not defined explicitly by user, the default value is "micromol/L").

age

Numeric vector. Age, in years.

sex

Vector. The value of variable refers to the parameters label_sex_male and label_sex_female.

weight

Numeric vector. Weight, kg.

creatinine_units

Character string. Units in which serum creatinne is expressed. Could be one of the following: "micromol/L", "mmol/L" or "mg/dL".

label_sex_male

List. Label(s) for definition(s) of male sex.

label_sex_female

List. Label(s) for definition(s) of female sex.

max_age

Numeric. Maximal age suitable for the equation application, in years. By default is 100 years, but change this value in case you would like to apply equation to older persons.

Details

Calculate Cockcroft-Gault by the Cockcroft-Gault equation.

Reference to the equation: Cockcroft, DW, Gault MH. Prediction of creatinine clearance from serum creatinine. Nephron. 1976. 16(1):31-41.

Citation: Bikbov B. kidney.epi: Kidney-Related Functions for Clinical and Epidemiological Research. Scientific-Tools.Org, https://Scientific-Tools.Org. DOI: 10.32614/CRAN.package.kidney.epi

Value

numeric creatinine clearance expressed in ml/min/1.73m2.

Author(s)

Programming: Boris Bikbov https://www.linkedin.com/in/boris-bikbov.

Examples

# for a single patient
egfr.cg.cr (creatinine = 1.4, age = 60, sex = "Male",
  weight = 80, creatinine_units = "mg/dl")
# for a dataset - see vignettes for details

Alias to the latest eGFR CKD-EPI creatinine-based equation

Description

Alias to the latest eGFR CKD-EPI creatinine-based equation

Usage

egfr.ckdepi.cr(...)

Arguments

...

all arguments for the egfr.ckdepi.cr.2021 function.

Details

The function is just an alias to the latest eGFR CKD-EPI creatinine-based equation.

Citation: Bikbov B. kidney.epi: Kidney-Related Functions for Clinical and Epidemiological Research. Scientific-Tools.Org, https://Scientific-Tools.Org. DOI: 10.32614/CRAN.package.kidney.epi

Value

numeric eGFR expressed in ml/min/1.73m2.


Calculate eGFR based on CKD-EPI 2009 creatinine-based equation

Description

Calculate eGFR based on CKD-EPI 2009 creatinine-based equation

Usage

egfr.ckdepi.cr.2009(
  creatinine,
  age,
  sex,
  ethnicity = NA,
  creatinine_units = "micromol/l",
  label_afroamerican = c("Afroamerican"),
  label_sex_male = c("Male", 1),
  label_sex_female = c("Female", 0),
  max_age = 100
)

Arguments

creatinine

Numeric vector. Serum creatinine, could be expressed in "micromol/L", "mmol/L" or "mg/dL". Units of measurement should be defined in variable creatinine_units (if not defined explicitly by user, the default value is "micromol/L").

age

Numeric vector. Age, in years.

sex

Vector. The value of variable refers to the parameters label_sex_male and label_sex_female.

ethnicity

Vector. Ethnicity. If no ethnicity will be defined, the calculation will use coefficients for White subjects. Specify ethnicity if a study includes African-American subjects, and define the the values of variable in the parameter label_afroamerican.

creatinine_units

Character string. Units in which serum creatinine is expressed. Could be one of the following: "micromol/L", "mmol/L" or "mg/dL".

label_afroamerican

List. Label(s) for Afroamerican ethnicity.

label_sex_male

List. Label(s) for definition(s) of male sex.

label_sex_female

List. Label(s) for definition(s) of female sex.

max_age

Numeric. Maximal age suitable for the equation application, in years. By default is 100 years, but change this value in case you would like to apply equation to older persons.

Details

Calculate estimated glomerular filtration rate (eGFR) by CKD-EPI 2009 creatinine-based equation.

Reference to the equation: Levey AS, Stevens LA, Schmid CH et al. A New Equation to Estimate Glomerular Filtration Rate. Ann Intern Med 2009;150:604–12.

Citation: Bikbov B. kidney.epi: Kidney-Related Functions for Clinical and Epidemiological Research. Scientific-Tools.Org, https://Scientific-Tools.Org. DOI: 10.32614/CRAN.package.kidney.epi

Value

numeric eGFR expressed in ml/min/1.73m2.

Author(s)

Programming: Boris Bikbov https://www.linkedin.com/in/boris-bikbov.

Examples

# for a single patient
egfr.ckdepi.cr.2009 (creatinine = 1.4, age = 60, sex = "Male", ethnicity = "White",
  creatinine_units = "mg/dl")
# for a dataset - see vignettes for details
# egfr.ckdepi.cr.2009 (creatinine = dta$scr, age = dta$age, sex = dta$sex,
#   ethnicity = dta$race, creatinine_units = "mg/dl")

Calculate eGFR by the CKD-EPI 2021 creatinine-based equation

Description

Calculate eGFR by the CKD-EPI 2021 creatinine-based equation

Usage

egfr.ckdepi.cr.2021(
  creatinine,
  age,
  sex,
  creatinine_units = "micromol/l",
  label_sex_male = c("Male", 1),
  label_sex_female = c("Female", 0),
  max_age = 100
)

Arguments

creatinine

Numeric vector. Serum creatinine, could be expressed in "micromol/L", "mmol/L" or "mg/dL". Units of measurement should be defined in variable creatinine_units (if not defined explicitly by user, the default value is "micromol/L").

age

Numeric vector. Age, in years.

sex

Vector. The value of variable refers to the parameters label_sex_male and label_sex_female.

creatinine_units

Character string. Units in which serum creatinne is expressed. Could be one of the following: "micromol/L", "mmol/L" or "mg/dL".

label_sex_male

List. Label(s) for definition(s) of male sex.

label_sex_female

List. Label(s) for definition(s) of female sex.

max_age

Numeric. Maximal age suitable for the equation application, in years. By default is 100 years, but change this value in case you would like to apply equation to older persons.

Details

Calculate estimated glomerular filtration rate (eGFR) by the CKD-EPI 2021 creatinine-based equation.

Reference to the equation: Inker LA, Eneanya ND, Coresh J, et al. New creatinine- and cystatin C–based equations to estimate GFR without race. N Engl J Med. 2021;385:1737-1749.

Citation: Bikbov B. kidney.epi: Kidney-Related Functions for Clinical and Epidemiological Research. Scientific-Tools.Org, https://Scientific-Tools.Org. DOI: 10.32614/CRAN.package.kidney.epi

Value

numeric eGFR expressed in ml/min/1.73m2.

Author(s)

Programming: Boris Bikbov https://www.linkedin.com/in/boris-bikbov.

Examples

# for a single patient
egfr.ckdepi.cr.2021(creatinine = 1.4, age = 60, sex = "Male", 
  creatinine_units = "mg/dl")
# for a dataset - see vignettes for details
# egfr.ckdepi.cr.2021(creatinine = dta$scr, age = dta$age, sex = dta$sex, 
#  creatinine_units = "mg/dl")

Calculate eGFR by the CKD-EPI 2021 creatinine-cystatin-based equation

Description

Calculate eGFR by the CKD-EPI 2021 creatinine-cystatin-based equation

Usage

egfr.ckdepi.cr_cys.2021(
  creatinine,
  cystatin,
  age,
  sex,
  creatinine_units = "micromol/l",
  cystatin_units = "mg/L",
  label_sex_male = c("Male", 1),
  label_sex_female = c("Female", 0),
  max_age = 100
)

Arguments

creatinine

Numeric vector. Serum creatinine, could be expressed in "micromol/L", "mmol/L" or "mg/dL". Units of measurement should be defined in variable creatinine_units (if not defined explicitly by user, the default value is "micromol/L").

cystatin

Numeric vector. Serum cystatin, could be expressed in "mg/L" or "nanomol/L". Units of measurement should be defined in variable cystatin_units (if not defined explicitly by user, the default value is "mg/L").

age

Numeric vector. Age, in years.

sex

Vector. The value of variable refers to the parameters label_sex_male and label_sex_female.

creatinine_units

Character string. Units in which serum creatinne is expressed. Could be one of the following: "micromol/L", "mmol/L" or "mg/dL".

cystatin_units

Character string. Units in which serum cystatin is expressed. Could be one of the following: "mg/L" or "nanomol/L"

label_sex_male

List. Label(s) for definition(s) of male sex.

label_sex_female

List. Label(s) for definition(s) of female sex.

max_age

Numeric. Maximal age suitable for the equation application, in years. By default is 100 years, but change this value in case you would like to apply equation to older persons.

Details

Calculate estimated glomerular filtration rate (eGFR) by the CKD-EPI 2021 creatinine-cystatin-based equation.

Reference to the equation: Inker LA, Eneanya ND, Coresh J, et al. New creatinine- and cystatin C–based equations to estimate GFR without race. N Engl J Med. 2021;385:1737-1749.

Citation: Bikbov B. kidney.epi: Kidney-Related Functions for Clinical and Epidemiological Research. Scientific-Tools.Org, https://Scientific-Tools.Org. DOI: 10.32614/CRAN.package.kidney.epi

Value

numeric eGFR expressed in ml/min/1.73m2.

Author(s)

Programming: Boris Bikbov https://www.linkedin.com/in/boris-bikbov.

Examples

# for a single patient
egfr.ckdepi.cr_cys.2021 (creatinine = 1.4, cystatin = 0.8, age = 60,
   sex = "Male", creatinine_units = "mg/dl")
# for a dataset - see vignettes for details
# egfr.ckdepi.cr_cys.2021 (creatinine = dta$scr, cystatin = dta$cys,
#  age = dta$age, sex = dta$sex, creatinine_units = "mg/dl")

Calculate eGFR by CKiD U25 creatinine-based equation (for children and young adults less then 25 years old)

Description

Calculate eGFR by CKiD U25 creatinine-based equation (for children and young adults less then 25 years old)

Usage

egfr.ckid_u25.cr(
  creatinine,
  age,
  sex,
  height_cm = 0,
  height_ft = 0,
  height_inch = 0,
  creatinine_units = "micromol/l",
  label_sex_male = c("Male", 1),
  label_sex_female = c("Female", 0)
)

Arguments

creatinine

Numeric vector. Serum creatinine, could be expressed in "micromol/L", "mmol/L" or "mg/dL". Units of measurement should be defined in variable creatinine_units (if not defined explicitly by user, the default value is "micromol/L").

age

Numeric vector. Age, in years.

sex

Vector. The value of variable refers to the parameters label_sex_male and label_sex_female.

height_cm

Numeric vector. Could be defined either as height_cm if is measured in cm, or as height_ft and height_inch if is measured in feet and inches. If the parameter height_cm is greater than 0, the function uses cm, otherwise - feet and inches.

height_ft

see height_cm

height_inch

see height_cm

creatinine_units

Character string. Units in which serum creatinne is expressed. Could be one of the following: "micromol/L", "mmol/L" or "mg/dL".

label_sex_male

List. Label(s) for definition(s) of male sex.

label_sex_female

List. Label(s) for definition(s) of female sex.

Details

Calculate estimated glomerular filtration rate (eGFR) by creatinine-based CKiD U25 equation.

Reference to the equation: Pierce CB, Muñoz A, Ng DK, Warady BA, Furth SL, Schwartz GJ. Age- and sex-dependent clinical equations to estimate glomerular filtration rates in children and young adults with chronic kidney disease. Kidney International. 2021;99(4):948–956. doi:10.1016/j.kint.2020.10.047.

Citation: Bikbov B. kidney.epi: Kidney-Related Functions for Clinical and Epidemiological Research. Scientific-Tools.Org, https://Scientific-Tools.Org. DOI: 10.32614/CRAN.package.kidney.epi

Value

numeric eGFR expressed in ml/min/1.73m2.

Author(s)

Programming: Boris Bikbov https://www.linkedin.com/in/boris-bikbov.

Examples

# for a single patient
egfr.ckid_u25.cr (creatinine = 1.4, age = 10, height_cm = 90, sex = "Male",
  creatinine_units = "mg/dl")
# for a dataset - see vignettes for details
# egfr.ckid_u25.cr (creatinine = dta$scr, age = dta$age, height_cm = dta$ht,
#  sex = dta$sex, creatinine_units = "mg/dl")

Calculate eGFR by CKiD U25 cystatin-based equation (for children and young adults less then 25 years old)

Description

Calculate eGFR by CKiD U25 cystatin-based equation (for children and young adults less then 25 years old)

Usage

egfr.ckid_u25.cys(
  cystatin,
  age,
  sex,
  cystatin_units = "mg/l",
  label_sex_male = c("Male", 1),
  label_sex_female = c("Female", 0)
)

Arguments

cystatin

Numeric vector. Serum cystatin, could be expressed in "mg/L" or "nanomol/L". Units of measurement should be defined in variable cystatin_units (if not defined explicitly by user, the default value is "mg/L").

age

Numeric vector. Age, in years. Age does not accounted in Schwartz equation, but used in the function to check whether Schwartz equation could be applied to a given patient.

sex

Vector. The value of variable refers to the parameters label_sex_male and label_sex_female.

cystatin_units

Character string. Units in which serum cystatin is expressed. Could be one of the following: "mg/L" or "nanomol/L"

label_sex_male

List. Label(s) for definition(s) of male sex.

label_sex_female

List. Label(s) for definition(s) of female sex.

Details

Calculate estimated glomerular filtration rate (eGFR) by cystatin-based CKiD U25 equation.

Reference to the equation: Pierce CB, Muñoz A, Ng DK, Warady BA, Furth SL, Schwartz GJ. Age- and sex-dependent clinical equations to estimate glomerular filtration rates in children and young adults with chronic kidney disease. Kidney International. 2021;99(4):948–956. doi:10.1016/j.kint.2020.10.047.

Citation: Bikbov B. kidney.epi: Kidney-Related Functions for Clinical and Epidemiological Research. Scientific-Tools.Org, https://Scientific-Tools.Org. DOI: 10.32614/CRAN.package.kidney.epi

Value

numeric eGFR expressed in ml/min/1.73m2.

Author(s)

Programming: Boris Bikbov https://www.linkedin.com/in/boris-bikbov.

Examples

# for a single patient
egfr.ckid_u25.cys (cystatin = 0.8, age = 10, sex = "Male",
  cystatin_units = "mg/l")
# for a dataset - see vignettes for details
# egfr.ckid_u25.cys (cystatin = dta$cystatin, age = dta$age,
#  sex = dta$sex, cystatin_units = "mg/l")

Calculate eGFR by the EKFC creatinine-based equation

Description

Calculate eGFR by the EKFC creatinine-based equation

Usage

egfr.ekfc.cr(
  creatinine,
  age,
  sex,
  ethnicity = NA,
  creatinine_units = "micromol/l",
  label_sex_male = c("Male", 1),
  label_sex_female = c("Female", 0),
  label_african = c("African"),
  max_age = 100
)

Arguments

creatinine

Numeric vector. Serum creatinine, could be expressed in "micromol/L", "mmol/L" or "mg/dL". Units of measurement should be defined in variable creatinine_units (if not defined explicitly by user, the default value is "micromol/L").

age

Numeric vector. Age, in years.

sex

Vector. The value of variable refers to the parameters label_sex_male and label_sex_female.

ethnicity

Vector. Ethnicity. If no ethnicity will be defined, the calculation will use coefficients for White European subjects. Specify ethnicity if a study includes African and Black European subjects, and define the values of variable in the parameter label_african.

creatinine_units

Character string. Units in which serum creatinne is expressed. Could be one of the following: "micromol/L", "mmol/L" or "mg/dL".

label_sex_male

List. Label(s) for definition(s) of male sex.

label_sex_female

List. Label(s) for definition(s) of female sex.

label_african

List. Label(s) for African ethnicity.

max_age

Numeric. Maximal age suitable for the equation application, in years. By default is 100 years, but change this value in case you would like to apply equation to older persons.

Details

Calculate estimated glomerular filtration rate (eGFR) by the EKFC creatinine-based equation.

References to the equation:

Citation: Bikbov B. kidney.epi: Kidney-Related Functions for Clinical and Epidemiological Research. Scientific-Tools.Org, https://Scientific-Tools.Org. DOI: 10.32614/CRAN.package.kidney.epi

Value

numeric eGFR expressed in ml/min/1.73m2.

Author(s)

Programming: Boris Bikbov https://www.linkedin.com/in/boris-bikbov.

Examples

# for a single patient
egfr.ekfc.cr (creatinine = 1.4, age = 60, sex = "Male", 
  creatinine_units = "mg/dl")
# for a dataset - see vignettes for details
# egfr.ekfc.cr (creatinine = dta$scr, age = dta$age, sex = dta$sex, 
#  creatinine_units = "mg/dl")

Calculate eGFR by the EKFC cystatin-based equation

Description

Calculate eGFR by the EKFC cystatin-based equation

Usage

egfr.ekfc.cys(cystatin, age, cystatin_units = "mg/L", max_age = 100)

Arguments

cystatin

Numeric vector. Serum cystatin, could be expressed in "mg/L" or "nanomol/L". Units of measurement should be defined in variable cystatin_units (if not defined explicitly by user, the default value is "mg/L").

age

Numeric vector. Age, in years.

cystatin_units

Character string. Units in which serum cystatin is expressed. Could be one of the following: "mg/L" or "nanomol/L"

max_age

Numeric. Maximal age suitable for the equation application, in years. By default is 100 years, but change this value in case you would like to apply equation to older persons.

Details

Calculate estimated glomerular filtration rate (eGFR) by the EKFC cystatin-based equation.

Reference to the equation: Pottel H, Björk J, Rule AD, et al. Cystatin C–based equation to estimate GFR without the inclusion of race and sex. N Engl J Med. 2023;388:333-343 doi: 10.1056/NEJMoa22037.

Citation: Bikbov B. kidney.epi: Kidney-Related Functions for Clinical and Epidemiological Research. Scientific-Tools.Org, https://Scientific-Tools.Org. DOI: 10.32614/CRAN.package.kidney.epi

Value

numeric eGFR expressed in ml/min/1.73m2.

Author(s)

Programming: Boris Bikbov https://www.linkedin.com/in/boris-bikbov.

Examples

# for a single patient
egfr.ekfc.cys (cystatin = 0.8, age = 60)
# for a dataset - see vignettes for details
# egfr.ekfc.cys (cystatin = dta$cys, age = dta$age)

Calculate eGFR by the Full age spectrum (FAS) creatinine-based equation

Description

Calculate eGFR by the Full age spectrum (FAS) creatinine-based equation

Usage

egfr.fas.cr(
  creatinine,
  age,
  sex,
  creatinine_units = "micromol/l",
  label_sex_male = c("Male", 1),
  label_sex_female = c("Female", 0),
  max_age = 100
)

Arguments

creatinine

Numeric vector. Serum creatinine, could be expressed in "micromol/L", "mmol/L" or "mg/dL". Units of measurement should be defined in variable creatinine_units (if not defined explicitly by user, the default value is "micromol/L").

age

Numeric vector. Age, in years.

sex

Vector. The value of variable refers to the parameters label_sex_male and label_sex_female.

creatinine_units

Character string. Units in which serum creatinne is expressed. Could be one of the following: "micromol/L", "mmol/L" or "mg/dL".

label_sex_male

List. Label(s) for definition(s) of male sex.

label_sex_female

List. Label(s) for definition(s) of female sex.

max_age

Numeric. Maximal age suitable for the equation application, in years. By default is 100 years, but change this value in case you would like to apply equation to older persons.

Details

Calculate estimated glomerular filtration rate (eGFR) by the Full age spectrum (FAS) creatinine-based equation.

Reference to the equation: Pottel H, Hoste L, Dubourg L et al. An estimating glomerular filtration rate equation for the full age spectrum. Nephrol Dial Transplant 2016; 31:798–806 doi:10.1093/ndt/gfv454.

Citation: Bikbov B. kidney.epi: Kidney-Related Functions for Clinical and Epidemiological Research. Scientific-Tools.Org, https://Scientific-Tools.Org. DOI: 10.32614/CRAN.package.kidney.epi

Value

numeric eGFR expressed in ml/min/1.73m2.

Author(s)

Programming: Boris Bikbov https://www.linkedin.com/in/boris-bikbov.

Examples

# for a single patient
egfr.fas.cr (creatinine = 1.4, age = 60, sex = "Male", 
  creatinine_units = "mg/dl")
# for a dataset - see vignettes for details
# egfr.fas.cr (creatinine = dta$scr, age = dta$age, sex = dta$sex, 
#  creatinine_units = "mg/dl")

Calculate eGFR by the Full age spectrum (FAS) creatinine-cystatin-based equation

Description

Calculate eGFR by the Full age spectrum (FAS) creatinine-cystatin-based equation

Usage

egfr.fas.cr_cys(
  creatinine,
  cystatin,
  age,
  sex,
  alpha = 0.5,
  creatinine_units = "micromol/l",
  cystatin_units = "mg/L",
  equation_type = "precise",
  label_sex_male = c("Male", 1),
  label_sex_female = c("Female", 0),
  max_age = 100
)

Arguments

creatinine

Numeric vector. Serum creatinine, could be expressed in "micromol/L", "mmol/L" or "mg/dL". Units of measurement should be defined in variable creatinine_units (if not defined explicitly by user, the default value is "micromol/L").

cystatin

Numeric vector. Serum cystatin, could be expressed in "mg/L" or "nanomol/L". Units of measurement should be defined in variable cystatin_units (if not defined explicitly by user, the default value is "mg/L").

age

Numeric vector. Age, in years.

sex

Vector. The value of variable refers to the parameters label_sex_male and label_sex_female.

alpha

Numeric vector. Alpha coefficient for the combined creatinine-cystatin equation. By default is equal to 0.5.

creatinine_units

Character string. Units in which serum creatinne is expressed. Could be one of the following: "micromol/L", "mmol/L" or "mg/dL".

cystatin_units

Character string. Units in which serum cystatin is expressed. Could be one of the following: "mg/L" or "nanomol/L"

equation_type

Character string. Whether to use "precise" or "simplified" equation.

label_sex_male

List. Label(s) for definition(s) of male sex.

label_sex_female

List. Label(s) for definition(s) of female sex.

max_age

Numeric. Maximal age suitable for the equation application, in years. By default is 100 years, but change this value in case you would like to apply equation to older persons.

Details

Calculate estimated glomerular filtration rate (eGFR) by the Full age spectrum (FAS) creatinine-cystatin-based equation.

Reference to the equation: Pottel H, Delanaye P, Schaeffner E et al. Estimating glomerular filtration rate for the full age spectrum from serum creatinine and cystatin C. Nephrol Dial Transplant 2017; 32:497–507 doi:10.1093/ndt/gfw425.

Citation: Bikbov B. kidney.epi: Kidney-Related Functions for Clinical and Epidemiological Research. Scientific-Tools.Org, https://Scientific-Tools.Org. DOI: 10.32614/CRAN.package.kidney.epi

Value

numeric eGFR expressed in ml/min/1.73m2.

Author(s)

Programming: Boris Bikbov https://www.linkedin.com/in/boris-bikbov.

Examples

# for a single patient
egfr.fas.cr_cys (creatinine = 1.4, cystatin = 0.8, age = 60,
   sex = "Male", creatinine_units = "mg/dl")
# for a dataset - see vignettes for details
# egfr.fas.cr_cys (creatinine = dta$scr, cystatin = dta$cys,
#  age = dta$age, sex = dta$sex, creatinine_units = "mg/dl")

Calculate eGFR by the Full age spectrum (FAS) cystatin-based equation

Description

Calculate eGFR by the Full age spectrum (FAS) cystatin-based equation

Usage

egfr.fas.cys(
  cystatin,
  age,
  cystatin_units = "mg/L",
  equation_type = "precise",
  max_age = 100
)

Arguments

cystatin

Numeric vector. Serum cystatin, could be expressed in "mg/L" or "nanomol/L". Units of measurement should be defined in variable cystatin_units (if not defined explicitly by user, the default value is "mg/L").

age

Numeric vector. Age, in years.

cystatin_units

Character string. Units in which serum cystatin is expressed. Could be one of the following: "mg/L" or "nanomol/L"

equation_type

Character string. Whether to use "precise" or "simplified" equation.

max_age

Numeric. Maximal age suitable for the equation application, in years. By default is 100 years, but change this value in case you would like to apply equation to older persons.

Details

Calculate estimated glomerular filtration rate (eGFR) by the Full age spectrum (FAS) cystatin-based equation.

Reference to the equation: Pottel H, Delanaye P, Schaeffner E et al. Estimating glomerular filtration rate for the full age spectrum from serum creatinine and cystatin C. Nephrol Dial Transplant 2017; 32:497–507 doi:10.1093/ndt/gfw425.

Citation: Bikbov B. kidney.epi: Kidney-Related Functions for Clinical and Epidemiological Research. Scientific-Tools.Org, https://Scientific-Tools.Org. DOI: 10.32614/CRAN.package.kidney.epi

Value

numeric eGFR expressed in ml/min/1.73m2.

Author(s)

Programming: Boris Bikbov https://www.linkedin.com/in/boris-bikbov.

Examples

# for a single patient
egfr.fas.cys (cystatin = 0.8, age = 60)
# for a dataset - see vignettes for details
# egfr.fas.cys (cystatin = dta$cys, age = dta$age)

Calculate eGFR by the revised Lund-Malmö creatinine-based equation

Description

Calculate eGFR by the revised Lund-Malmö creatinine-based equation

Usage

egfr.lm.cr(
  creatinine,
  age,
  sex,
  creatinine_units = "micromol/l",
  label_sex_male = c("Male", 1),
  label_sex_female = c("Female", 0),
  max_age = 100
)

Arguments

creatinine

Numeric vector. Serum creatinine, could be expressed in "micromol/L", "mmol/L" or "mg/dL". Units of measurement should be defined in variable creatinine_units (if not defined explicitly by user, the default value is "micromol/L").

age

Numeric vector. Age, in years.

sex

Vector. The value of variable refers to the parameters label_sex_male and label_sex_female.

creatinine_units

Character string. Units in which serum creatinne is expressed. Could be one of the following: "micromol/L", "mmol/L" or "mg/dL".

label_sex_male

List. Label(s) for definition(s) of male sex.

label_sex_female

List. Label(s) for definition(s) of female sex.

max_age

Numeric. Maximal age suitable for the equation application, in years. By default is 100 years, but change this value in case you would like to apply equation to older persons.

Details

Calculate estimated glomerular filtration rate (eGFR) by the revised Lund-Malmö creatinine-based equation.

Reference to the equation: Björk J, Grubb A, Sterner G, Nyman U. Revised equations for estimating glomerular filtration rate based on the Lund-Malmö Study cohort. Scand J Clin Lab Invest. 2011;71: 232-239.

Citation: Bikbov B. kidney.epi: Kidney-Related Functions for Clinical and Epidemiological Research. Scientific-Tools.Org, https://Scientific-Tools.Org. DOI: 10.32614/CRAN.package.kidney.epi

Value

numeric eGFR expressed in ml/min/1.73m2.

Author(s)

Programming: Boris Bikbov https://www.linkedin.com/in/boris-bikbov.

Examples

# for a single patient
egfr.lm.cr (creatinine = 1.4, age = 60, sex = "Male", 
  creatinine_units = "mg/dl")
# for a dataset - see vignettes for details
# egfr.lm.cr (creatinine = dta$scr, age = dta$age, sex = dta$sex, 
#  creatinine_units = "mg/dl")

Calculate estimated glomerular filtration rate (eGFR) by MDRD equation

Description

Calculate estimated glomerular filtration rate (eGFR) by MDRD equation

Usage

egfr.mdrd4(
  creatinine,
  age,
  sex,
  ethnicity = NA,
  creatinine_units = "micromol/l",
  creatinine_method = "non-IDMS",
  label_afroamerican = c("Afroamerican"),
  label_sex_male = c("Male", 1),
  label_sex_female = c("Female", 0),
  max_age = 100
)

Arguments

creatinine

Numeric vector. Serum creatinine, could be expressed in "micromol/L", "mmol/L" or "mg/dL". Units of measurement should be defined in variable creatinine_units (if not defined explicitly by user, the default value is "micromol/L").

age

Numeric vector. Age, in years.

sex

Vector. The value of variable refers to the parameters label_sex_male and label_sex_female.

ethnicity

Vector. Ethnicity, specify in case of African-American patients. The value of variable refers to the parameter label_afroamerican.

creatinine_units

Character string. Units in which serum creatinne is expressed. Could be one of the following: "micromol/L", "mmol/L" or "mg/dL".

creatinine_method

Character string. Creatinine standartisation method in a laboratory. Could be either "IDMS" or "non-IDMS". If not explicitly defined by user, the default assumption is "non-IDMS".

label_afroamerican

List. Label(s) for Afroamerican ethnicity.

label_sex_male

List. Label(s) for definition(s) of male sex.

label_sex_female

List. Label(s) for definition(s) of female sex.

max_age

Numeric. Maximal age suitable for the equation application, in years. By default is 100 years, but change this value in case you would like to apply equation to older persons.

Details

Calculate estimated glomerular filtration rate (eGFR) by MDRD equation.

Reference to the equation: Levey AS, Coresh J, Greene T, et al. Using standardized serum creatinine values in the modification of diet in renal disease study equation for estimating glomerular filtration rate. Annals of Internal Medicine 2006;145:247–54.

Citation: Bikbov B. kidney.epi: Kidney-Related Functions for Clinical and Epidemiological Research. Scientific-Tools.Org, https://Scientific-Tools.Org. DOI: 10.32614/CRAN.package.kidney.epi

Value

numeric eGFR expressed in ml/min/1.73m2.

Author(s)

Programming: Boris Bikbov https://www.linkedin.com/in/boris-bikbov.

Examples

# for a single patient
egfr.mdrd4 (creatinine = 1.4, age = 60, sex = "Male", ethnicity = "White",
  creatinine_units = "mg/dl")
# for a dataset - see vignettes for details
# egfr.mdrd4 (creatinine = dta$scr, age = dta$age, sex = dta$sex,
#  ethnicity = dta$race, creatinine_units = "mg/dl")

Deprecated function name. Use specific functions egfr.schwartz.cr(), egfr.schwartz.cys(), egfr.schwartz.cr_cys().

Description

Deprecated function name. Use specific functions egfr.schwartz.cr(), egfr.schwartz.cys(), egfr.schwartz.cr_cys().

Usage

egfr.schwartz(...)

Arguments

...

used for legacy only.

Details

Deprecated function name.


Calculate eGFR by Schwartz creatinine-based equation (for children only, both "classic" bedside and "quadratic")

Description

Calculate eGFR by Schwartz creatinine-based equation (for children only, both "classic" bedside and "quadratic")

Usage

egfr.schwartz.cr(
  creatinine,
  age,
  sex,
  height_cm = 0,
  height_ft = 0,
  height_inch = 0,
  creatinine_units = "micromol/l",
  equation_type = "classic",
  label_sex_male = c("Male", 1),
  label_sex_female = c("Female", 0)
)

Arguments

creatinine

Numeric vector. Serum creatinine, could be expressed in "micromol/L", "mmol/L" or "mg/dL". Units of measurement should be defined in variable creatinine_units (if not defined explicitly by user, the default value is "micromol/L").

age

Numeric vector. Age, in years. Age does not accounted in Schwartz equation, but used in the function to check whether Schwartz equation could be applied to a given patient.

sex

Vector. The value of variable refers to the parameters label_sex_male and label_sex_female. Required only in case of quadratic Schwartz equation.

height_cm

Numeric vector. Could be defined either as height_cm if is measured in cm, or as height_ft and height_inch if is measured in feet and inches. If the parameter height_cm is greater than 0, the function uses cm, otherwise - feet and inches.

height_ft

see height_cm

height_inch

see height_cm

creatinine_units

Character string. Units in which serum creatinne is expressed. Could be one of the following: "micromol/L", "mmol/L" or "mg/dL".

equation_type

Character string. Define whether to calculate eGFR either by classic Schwartz or quadratic Schwartz equation. Could be one of the following: "classic", "quadratic". If not explicitly defined by user, the default assumption is "classic".

label_sex_male

List. Label(s) for definition(s) of male sex.

label_sex_female

List. Label(s) for definition(s) of female sex.

Details

Calculate estimated glomerular filtration rate (eGFR) by Schwartz creatinine-based equation.

References to the equation: Gao A, Cachat F, Faouzi M et al. Comparison of the glomerular filtration rate in children by the new revised Schwartz formula and a new generalized formula. Kidney International 2013;83:524–30.

Citation: Bikbov B. kidney.epi: Kidney-Related Functions for Clinical and Epidemiological Research. Scientific-Tools.Org, https://Scientific-Tools.Org. DOI: 10.32614/CRAN.package.kidney.epi

Value

numeric eGFR expressed in ml/min/1.73m2.

Author(s)

Programming: Boris Bikbov https://www.linkedin.com/in/boris-bikbov.

Examples

# for a single patient
egfr.schwartz.cr (creatinine = 1.4, age = 10, height_cm = 90, sex = "Male",
  creatinine_units = "mg/dl")
egfr.schwartz.cr (creatinine = 1.4, age = 10, height_cm = 90, sex = "Male",
  creatinine_units = "mg/dl", equation_type = "quadratic")
# for a dataset - see vignettes for details
# egfr.schwartz.cr (creatinine = dta$scr, age = dta$age, height_cm = dta$ht,
#  sex = dta$sex, creatinine_units = "mg/dl")

Calculate eGFR by Schwartz multivariate equation with cystatin C, ht/Scr, and BUN(for children only)

Description

Calculate eGFR by Schwartz multivariate equation with cystatin C, ht/Scr, and BUN(for children only)

Usage

egfr.schwartz.cr_cys(
  creatinine,
  creatinine_units = "mg/dL",
  cystatin,
  cystatin_units = "mg/L",
  bun,
  bun_units = "mg/dL",
  sex,
  height_cm = 0,
  height_ft = 0,
  height_inch = 0,
  label_sex_male = c("Male", 1),
  label_sex_female = c("Female", 0)
)

Arguments

creatinine

Numeric vector. Serum creatinine, could be expressed in "micromol/L", "mmol/L" or "mg/dL". Units of measurement should be defined in variable creatinine_units (if not defined explicitly by user, the default value is "micromol/L").

creatinine_units

Character string. Units in which serum creatinine is expressed. Could be one of the following: "micromol/L", "mmol/L" or "mg/dL".

cystatin

Numeric vector. Serum cystatin, could be expressed in "mg/L" or "nanomol/L". Units of measurement should be defined in variable cystatin_units (if not defined explicitly by user, the default value is "mg/L").

cystatin_units

Character string. Units in which serum cystatin is expressed. Could be one of the following: "mg/L" or "nanomol/L".

bun

Numeric vector. Blood urea nitrogen, could be expressed in "mg/dL" or "mmol/L". Units of measurement should be defined in variable bun_units (if not defined explicitly by user, the default value is "mg/dL").

bun_units

Character string. Units in which blood urea nitrogen is expressed. Could be one of the following: "mg/dL" or "mmol/L".

sex

Vector. The value of variable refers to the parameters label_sex_male and label_sex_female.

height_cm

Numeric vector. Could be defined either as height_cm if is measured in cm, or as height_ft and height_inch if is measured in feet and inches. If the parameter height_cm is greater than 0, the function uses cm, otherwise - feet and inches.

height_ft

see height_cm

height_inch

see height_cm

label_sex_male

List. Label(s) for definition(s) of male sex.

label_sex_female

List. Label(s) for definition(s) of female sex.

Details

Calculate estimated glomerular filtration rate (eGFR) by Schwartz multivariate equation with cystatin C, ht/Scr, and BUN.

Reference to the equation: Schwartz GJ, Schneider MF, Maier PS et al. Improved equations estimating GFR in children with chronic kidney disease using an immunonephelometric determination of cystatin C. Kidney Int 2012; 82: 445–453.

Citation: Bikbov B. kidney.epi: Kidney-Related Functions for Clinical and Epidemiological Research. Scientific-Tools.Org, https://Scientific-Tools.Org. DOI: 10.32614/CRAN.package.kidney.epi

Value

numeric eGFR expressed in ml/min/1.73m2.

Author(s)

Programming: Boris Bikbov https://www.linkedin.com/in/boris-bikbov.


Calculate eGFR by Schwartz cystatin C-based equation (for children only)

Description

Calculate eGFR by Schwartz cystatin C-based equation (for children only)

Usage

egfr.schwartz.cys(cystatin, cystatin_units = "mg/L")

Arguments

cystatin

Numeric vector. Serum cystatin, could be expressed in "mg/L" or "nanomol/L". Units of measurement should be defined in variable cystatin_units (if not defined explicitly by user, the default value is "mg/L").

cystatin_units

Character string. Units in which serum cystatin is expressed. Could be one of the following: "mg/L" or "nanomol/L"

Details

Calculate estimated glomerular filtration rate (eGFR) by Schwartz cystatin C-based equation.

Reference to the equation: Schwartz GJ, Schneider MF, Maier PS et al. Improved equations estimating GFR in children with chronic kidney disease using an immunonephelometric determination of cystatin C. Kidney Int 2012; 82: 445–453.

Citation: Bikbov B. kidney.epi: Kidney-Related Functions for Clinical and Epidemiological Research. Scientific-Tools.Org, https://Scientific-Tools.Org. DOI: 10.32614/CRAN.package.kidney.epi

Value

numeric eGFR expressed in ml/min/1.73m2.

Author(s)

Programming: Boris Bikbov https://www.linkedin.com/in/boris-bikbov.

Examples

# for a single patient
egfr.schwartz.cys(cystatin = 1.4)
# for a dataset - see vignettes for details

A sample dataset with kidney transplant patients.

Description

A dataset contains 10 records for kidney transplant patients, including information about deceased donors.

Usage

ktx.data

Format

A data frame with 10 rows and 12 variables:

ptid

patient identifier

rec.age

age of the recipient, in years

don.age

age of the donor, in years

don.height

height of the donor, in cm

don.weight

weight of the donor, in kg

don.ethnicity

ethnicity of the donor

don.hypertension

history of hypertension for the donor

don.diabetes

history of diabetes for the donor

don.causeofdeath

cause of death for the donor

don.creatinine

serum creatinine of the donor, in mg/dL

don.hcv

hepatitis c virus status of the donor

don.dcdstatus

donation after circulatory death status of the donor

don.sex

sex of the donor

Source

Generation from different patients' records


Calculate KDRI and KDPI for deceased kidney donor

Description

Calculate KDRI and KDPI for deceased kidney donor

Usage

ktx.kdpi.optn(
  age,
  height_cm = 0,
  height_ft = 0,
  height_inch = 0,
  weight_kg = 0,
  weight_lb = 0,
  ethnicity = NA,
  hypertension,
  diabetes,
  causeofdeath,
  creatinine,
  hcv,
  dcdstatus,
  creatinine_units = "micromol/l",
  return_output_type = "KDPI",
  mapping_values_year = "latest",
  label_afroamerican = c("Afroamerican"),
  label_hypertension_positive = c("yes"),
  label_hypertension_unknown = "NA",
  label_diabetes_positive = c("yes"),
  label_diabetes_unknown = "NA",
  label_causeofdeath = c("cva"),
  label_hcv_positive = c("positive"),
  label_hcv_unknown = "NA",
  label_dcdstatus = c("yes")
)

Arguments

age

Numeric vector. Age, in years.

height_cm

Numeric vector. Could be defined either as height_cm if is measured in cm, or as height_ft and height_inch if is measured in feet and inches. If the parameter height_cm is greater than 0, the function uses cm, otherwise - feet and inches.

height_ft

see height_cm

height_inch

see height_cm

weight_kg

Numeric vector. Could be defined either as weight_kg if measured in kg, or as weight_lb if is measured in pounds. If the parameter weight_kg is greater than 0, the function uses kg, otherwise - pounds.

weight_lb

see weight_kg

ethnicity

Vector. Ethnicity, specify in case of African-American donors which have special coefficient in the regression equation. The value of variable refers to the parameter label_afroamerican.

hypertension

Vector. History of hypertension, specify in case of hypertensive donors which have special coefficient in the regression equation. The value of variable refers to the parameters label_hypertension_positive and label_hypertension_unknown.

diabetes

Vector. History of diabetes, specify in case of donors with diabetes which have special coefficient in the regression equation. The value of variable refers to the parameters label_diabetes_positive and label_diabetes_unknown.

causeofdeath

Vector. Cause of death, specify whether death was due to cerebrovascular disease, or other reasons.

creatinine

Numeric vector. Serum creatinine, could be expressed in "micromol/L", "mmol/L" or "mg/dL". Units of measurement should be defined in variable creatinine_units (if not defined explicitly by user, the default value is "micromol/L").

hcv

Vector. Hepatitis C virus status. The value of variable refers to the parameters label_hcv_positive and label_hcv_unknown.

dcdstatus

Vector. Donation after circulatory death status. Specify whether organ was from a donor after circulatory death or not. The value of variable refers to the parameter label_dcdstatus.

creatinine_units

Character string. Units in which serum creatinne is expressed. Could be one of the following: "micromol/L", "mmol/L" or "mg/dL".

return_output_type

Character string. Specify which calculated parameter to return from the function: "KDRI_Rao" - Raw Kidney Donor Risk Index, "KDRI_median" - scaled to the median Kidney Donor Risk Index, or "KDPI" - Kidney Donor Profile Index.

mapping_values_year

Numeric value or character string. Specify which year to take for the OPTN mapping table, as well as KDRI scaling factor and chances of hypertension and diabetes in case if they were unknown for donor.

By default the value is "latest", and the function takes the latest available OPTN mapping table and coefficients from the internal dataframes ktx.kdpi_mapping_table and ktx.kdpi_coefficients_table.

But if necessary, a user could define the exact year (i.e. mapping_values_year = 2015).

For a list of available years run the following: ktx.kdpi.optn.show.years().

label_afroamerican

List. Label(s) for Afroamerican ethnicity.

label_hypertension_positive

List. Label(s) for a positive history of hypertension.

label_hypertension_unknown

List. Label(s) for donors with unknown history of hypertension.

label_diabetes_positive

List. Label(s) for a positive history of diabetes.

label_diabetes_unknown

List. Label(s) for donors with unknown history of diabetes.

label_causeofdeath

List. Label(s) for a cause of death due to cerebrovascular/stroke.

label_hcv_positive

List. Label(s) for a positive HCV status.

label_hcv_unknown

List. Label(s) for an unknown, not done, indeterminate, or pending HCV status.

label_dcdstatus

List. Label(s) for a donor after circulatory death status.

Details

Calculate Kidney Donor Risk Index (KDRI) and Kidney Donor Profile Index (KDPI) based on the algorithm of US Organ Procurement and Transplantation Network. The Kidney Donor Profile Index (KDPI) is a numerical measure that combines ten donor factors to summarize into a single number the quality of deceased donor kidneys relative to other recovered kidneys. KDRI could be calculated only for a deceased donor!

More reading:

Citation: Bikbov B. R open source programming code for calculation of the Kidney Donor Profile Index and Kidney Donor Risk Index. Kidney Diseases, 2018; 4:269–272. DOI: 10.1159/000492427

Value

numeric One of the following values based on the return_output_type argument: Raw Kidney Donor Risk Index (KDRI), Scaled to the median Kidney Donor Risk Index (KDRI), or Kidney Donor Profile Index (KDPI).

Author(s)

Programming: Boris Bikbov https://www.linkedin.com/in/boris-bikbov.

Examples

# for a single patient
ktx.kdpi.optn (age = 60, height_cm = 168, weight_kg = 93, ethnicity = "White",
  hypertension = "yes", diabetes = "no", causeofdeath = "roadinjury",
  creatinine = 1.4, hcv = "negative", dcdstatus = "no",
  creatinine_units = "mg/dl", return_output_type = "KDRI_Rao")
ktx.kdpi.optn (age = 30, height_cm = 176, weight_kg = 82, ethnicity = "White", 
  hypertension = "NA", diabetes = "no", causeofdeath = "roadinjury", # note that NA is in the quotes
  creatinine = 150, hcv = "negative", dcdstatus = "no", return_output_type = "KDPI")
# for a dataset - see vignettes for details

Shows which years are available in the R package for the OPTN mapping table, KDRI scaling factor, etc.

Description

Shows which years are available in the R package for the OPTN mapping table, KDRI scaling factor, etc.

Usage

ktx.kdpi.optn.show.years()

Details

Service function which shows for user for which year(s) the OPTN mapping table, as well as KDRI scaling factor and chances of hypertension and diabetes in case if they were unknown for donor in the ktx.kdpi_mapping_table and ktx.kdpi_coefficients_table. This years could be used for the argument mapping_values_year of the ktx.kdpi.optn function.

This function has no arguments.

Value

numeric List of years which could be used for the argument mapping_values_year of the ktx.kdpi.optn function.


Creates a named matrix from two variables.

Description

Creates a named matrix from two variables.

Usage

matrix.cross_table(var1, var2, predefined_levels = NA)

Arguments

var1

Character vector. Values representing first variable.

var2

Character vector. Values representing second variable.

predefined_levels

Character vector. Levels for var1 and var2. If omitted, the variables just coded according to the levels they have. If contains vector, the variables are coded according to predefined_levels values, the latter could be useful if var1 and var2 contain not all levels of interest

Details

Creates a named matrix from two variables.

Value

matrix with cross-tabulation of var1 and var2.


Access matrix cells by row and column names

Description

Access matrix cells by row and column names

Usage

matrix.get_named_matrix_value(matrix_data, row_name, col_name)

Arguments

matrix_data

matrix. Matrix with data.

row_name

character. Row name in the matrix.

col_name

character. Column name in the matrix.

Details

Access matrix cells by row and column names.

Value

vector. Matrix value.


Read Excel file and convert it to matrix with row and column names.

Description

Read Excel file and convert it to matrix with row and column names.

Usage

matrix.read_excel_to_named_matrix(file_path, sheet_name = NULL)

Arguments

file_path

character. Path to Excel file.

sheet_name

character. Name of Excel sheet. Optional, if there is only one sheet with data, the function will read it with no need to specifying the sheet name.

Details

Read Excel file and convert it to matrix with row and column names.

Value

Excel file saved to a specified folder.


Save a named matrix as an Excel file.

Description

Save a named matrix as an Excel file.

Usage

matrix.save_named_matrix_to_excel(
  matrix_data,
  file_path,
  sheet_name = "Sheet1",
  save_type = "new"
)

Arguments

matrix_data

matrix. Matrix for saving.

file_path

character. Path to the Excel file.

sheet_name

character. Name of the Excel sheet.

save_type

character. Defines whether the Excel file should be created or overwritten (save_type = "new"), or new sheet should be added to the existing Excel file (save_type = "add").

Details

Save a named matrix as an Excel file.

Value

Excel file saved to a specified folder.


Legacy function to calculate albuminuria categories

Description

Legacy function to calculate albuminuria categories

Usage

nephro.albuminuria_category(...)

Arguments

...

all arguments for the ckd.kdigo_category.albuminuria() function.

Details

Legacy function to calculate albuminuria categories (A1, A2, A3) based on albuminuria values. Alias to the ckd.kdigo_category.albuminuria() function. This function is for legacy use only.


Legacy function to calculate KDIGO GFR categories

Description

Legacy function to calculate KDIGO GFR categories

Legacy function to calculate KDIGO risk categories

Usage

nephro.gfr_category(...)

nephro.kdigo_risk_category(...)

Arguments

...

all arguments for the ckd.kdigo_category.risk() function.

Details

Legacy function to calculate KDIGO GFR categories. Alias to the ckd.kdigo_category.gfr() function. This function is for legacy use only.

Legacy function to calculate KDIGO risk categories. Alias to the ckd.kdigo_category.risk() function. This function is for legacy use only.


Legacy function to calculate proteinuria categories

Description

Legacy function to calculate proteinuria categories

Usage

nephro.proteinuria_category(...)

Arguments

...

all arguments for the ckd.kdigo_category.proteinuria() function.

Details

Legacy function to calculate albuminuria categories (A1, A2, A3) based on proteinuria values. Alias to the ckd.kdigo_category.proteinuria() function. This function is for legacy use only.


Convert creatinine values between measurement units.

Description

Convert creatinine values between measurement units.

Usage

service.convert_creatinine(
  creatinine,
  creatinine_units,
  creatinine_reference_units = "mg/dl"
)

Arguments

creatinine

Numeric. The creatinine value from a data set.

creatinine_units

Character. Creatinine mesurement units in a data set.

creatinine_reference_units

Character. Creatinine measurement units as a desired output (mg/dl by default).

Details

Service function which check measurement units and convert creatinine values to selected by user.

Value

numeric Creatinine values converted into reference measurement units.


Convert cystatin C values between measurement units.

Description

Convert cystatin C values between measurement units.

Convert blood urea nitrogen values between measurement units.

Usage

service.convert_cystatin(cystatin, cystatin_units)

service.convert_bun(bun, bun_units)

Arguments

cystatin

Numeric. The cystatin C values from a data set.

cystatin_units

Character. Cystatin C measurement units in a data set.

bun

Numeric. The blood urea nitrogen values from a data set.

bun_units

Character. Blood urea nitrogen measurement units in a data set.

Details

Service function which check measurement units and convert cystatin C values to mg/l.

Service function which check measurement units and convert blood urea nitrogen values.

Value

numeric Cystatin C values converted in mg/l.

numeric Blood urea nitrogen values converted in mg/dl.