Title page

Title: Urinary Vitamin D Binding Protein Loss as a Potential Biomarker for Diabetic Nephropathy in Patients at Risk for Type 2 Diabetes

Author: Windy ZN Wang

Affiliations: University of Toronto

Disclaimers:

Correspondence: windy.wang@mail.utoronto.ca

Funding support: CIHR, Sharon Zeiler, BBDC Novo Nordisk, Dairy Farmers

Abstract

Background

Methods

Subjects

# Only set if the Rmd file is not in the parent directory (ie. 'projectname/')
knitr::opts_knit$set(root.dir = '../')

knitr::opts_chunk$set(collapse = TRUE, echo = FALSE, message = FALSE, warning = FALSE)
library(dplyr)
devtools::load_all()
load_data(update = TRUE)
set_options()
# extrafont::loadfonts(device="win")
# source('.Rprofile')
# run_setup()
# load_data('data/project_data.rda')
# dim(ds)
ds <- project_data

dsBase <- ds %>% 
  dplyr::filter(fVN == "Baseline")

# Subjects with measurements at all visit numbers

dsComplete <- ds %>%
  dplyr::group_by(SID) %>%
  dplyr::filter(n() == 3) %>%
  dplyr::ungroup()
## Include captions below using `captioner` package

figNums <- captioner::captioner(prefix = 'Figure')
supFigNums <- captioner::captioner(prefix = 'Supplementary Figure')
tabNums <- captioner::captioner(prefix = 'Table')
supTabNums <- captioner::captioner(prefix = 'Supplementary Table')

PAPER 1: KIDNEY MEASURE RESULTS

Subject Characteristics

TABLE 1: Subject characteristics across UDBP tertiles

subchar_table_tert <- tableone::CreateTableOne(
  vars = c("Age",
           "Sex",
           "Ethnicity",
           "BMI",
           "Waist",
           "eGFR",
           "ACR",
           "UrineCreatinine",
           "UrineMicroalbumin",
           "UrinaryCalcium",
           "UDBP",
           "udbpCrRatio",
           "Systolic",
           "Diastolic",
           "MeanArtPressure",
           "dmStatus"),
  strata = c("udbpTertile"),
  data = dsBase,
  factorVars = c("Sex", "Ethnicity", "dmStatus")
) %>% 
  print(nonnormal = c("UDBP",
                      "ACR",
                      "UrineMicroalbumin"),
        quote = FALSE,
        noSpaces = TRUE)

TABLE 2: Subject characteristics across UDBP:cR tertiles

subchar_table_tert <- tableone::CreateTableOne(
  vars = c("Age",
           "Sex",
           "Ethnicity",
           "BMI",
           "Waist",
           "eGFR",
           "ACR",
           "UrineCreatinine",
           "UrineMicroalbumin",
           "UrinaryCalcium",
           "UDBP",
           "udbpCrRatio",
           "Systolic",
           "Diastolic",
           "MeanArtPressure",
           "dmStatus"),
  strata = c("udbpCrTertile"),
  data = dsBase,
  factorVars = c("Sex", "Ethnicity", "dmStatus")
) %>% 
  print(nonnormal = c("UDBP",
                      "ACR",
                      "UrineMicroalbumin"),
        quote = FALSE,
        noSpaces = TRUE)

TABLE 3: Subject characteristics across time

subchar_table_time <- tableone::CreateTableOne(
  vars = c("Age",
           "Sex",
           "Ethnicity",
           "BMI",
           "Waist",
           "eGFR",
           "ACR",
           "UrineCreatinine",
           "UrineMicroalbumin",
           "UDBP",
           "udbpCrRatio",
           "Systolic",
           "Diastolic",
           "MeanArtPressure",
           "dmStatus"),
  strata = c("fVN"),
  data = ds,
  factorVars = c("Sex", "Ethnicity", "dmStatus")
) %>% 
  print(nonnormal = c("UDBP",
                      "udbpCrRatio",
                      "ACR",
                      "UrineMicroalbumin"),
        quote = FALSE,
        noSpaces = TRUE)

TABLE 4: Subject characteristics across time (complete data)

subchar_table_time <- tableone::CreateTableOne(
  vars = c("Age",
           "Sex",
           "Ethnicity",
           "BMI",
           "Waist",
           "eGFR",
           "ACR",
           "UrineCreatinine",
           "UrineMicroalbumin",
           "UDBP",
           "udbpCrRatio",
           "Systolic",
           "Diastolic",
           "MeanArtPressure",
           "dmStatus"),
  strata = c("fVN"),
  data = dsComplete,
  factorVars = c("Sex", "Ethnicity", "dmStatus")
) %>% 
  print(nonnormal = c("UDBP",
                      "udbpCrRatio",
                      "ACR",
                      "UrineMicroalbumin"),
        quote = FALSE,
        noSpaces = TRUE)

Cross-sectional

ACR

# Clean data
acr <- ds %>% 
  filter(fVN == "Baseline") %>% 
  select(acrStatus, udbpCrRatio) %>%
  na.omit()

# Box plot of uVDBP in different albuminuria categories
acr %>% 
  box_plot("acrStatus", "log(udbpCrRatio)", 
            "Albuminuria",
            "log uVDBP:Creatinine")

# n
acr %>% 
  group_by(acrStatus) %>% 
  summarise(n = n())

# ANOVA
anova <- aov(formula = log(udbpCrRatio)~acrStatus, data = acr)
summary(anova)
TukeyHSD(anova)
rm(anova)
# Scatterplot of ACR and uVDBP ----------------------------------

ds %>% 
  filter(fVN == "Baseline") %>% 
  scatter_plot("log(ACR)", "log(udbpCrRatio)",
               "log Albumin:Creatinine Ratio",
               "log UDBP:Creatinine")

# Spearman Correlation ------------------------------------------

ds %>% 
  filter(fVN == "Baseline") %>% 
  cor.test(formula = ~ ACR + udbpCrRatio, data = ., method = "spearman")

# Linear Regression ---------------------------------------------

ds %>% 
  prep_mason_data() %>% 
  mason_glm(y = "ACR",
            x = "udbpCrRatio",
            covars = c("ageBase", "Sex", "Ethnicity", "fDM", "fMedsBP")
            )

eGFR

# Clean data
eGFR <- ds %>% 
  filter(fVN == "Baseline") %>% 
  select(eGFRStatus, udbpCrRatio) %>%
  na.omit()

# Box plot of uVDBP in different eGFR categories
eGFR %>% 
  box_plot("eGFRStatus", "log(udbpCrRatio)", 
            "Kidney Status",
            "log uVDBP:Creatinine")

# n
eGFR %>% 
  group_by(eGFRStatus) %>% 
  summarise(n = n())

# ANOVA
anova <- aov(formula = log(udbpCrRatio)~eGFRStatus, data = eGFR)
summary(anova)
TukeyHSD(anova)
rm(anova)
# Scatterplot of eGFR and uVDBP ----------------------------------

ds %>% 
  filter(fVN == "Baseline") %>% 
  scatter_plot("log(eGFR)", "log(udbpCrRatio)",
               "log Estimated Glomerular Filtration Rate",
               "log UDBP:Creatinine")

# Spearman Correlation ------------------------------------------

ds %>% 
  filter(fVN == "Baseline") %>% 
  cor.test(formula = ~ eGFR + udbpCrRatio, data = ., method = "spearman")

# Linear Regression ---------------------------------------------

ds %>% 
  prep_mason_data() %>% 
  mason_glm(y = "eGFR",
            x = "udbpCrRatio",
            covars = c("ageBase", "Sex", "Ethnicity", "fDM", "fMedsBP")
            )
ds %>% 
  prep_mason_data() %>% 
  mason_glm(y = "eGFR",
            x = "udbpCrRatio"
            # covars = "ageBase"
            )

Medication

ds_med <- ds %>% 
  dplyr::select(SID, VN, fMedsBP) %>% 
  na.omit()

Progression

ACR

ds %>% 
  plot_progress(yvar = "log(ACR)",
                ylab = "log(ACR)")

# Complete data

dsComplete %>% 
  plot_progress(yvar = "log(ACR)",
                ylab = "log(ACR)")

# ANOVA ------------------------------------------------------------

anova <- aov(formula = log(ACR)~fVN, data = ds)
summary(anova)
TukeyHSD(anova)
rm(anova)

# GEE ---------------------------------------------------------------

ds %>% 
  prep_mason_data() %>% 
  mason_gee(y = c("ACR", "eGFR"),
            x = "VN") %>%
  dplyr::filter(!term == "(Intercept)") %>%
  dplyr::mutate(p = round(p.value, 2),
    p = ifelse(p == "0", "<0.001", p),
    estCI = paste0(round(estimate, 2), " (",
                               round(conf.low, 2), ", ",
                               round(conf.high, 2), ")")) %>% 
  dplyr::select(Yterms, Xterms, term, estCI, p) %>% 
  # tidyr::spread(Yterms, estCI) %>%
  pander::pander()

dsComplete %>% 
  prep_mason_data() %>% 
  mason_gee(y = c("ACR", "eGFR"),
            x = "VN") %>%
  dplyr::filter(!term == "(Intercept)") %>%
  dplyr::mutate(p = round(p.value, 2),
    p = ifelse(p == "0", "<0.001", p),
    estCI = paste0(round(estimate, 2), " (",
                               round(conf.low, 2), ", ",
                               round(conf.high, 2), ")")) %>% 
  dplyr::select(Yterms, Xterms, term, estCI, p) %>% 
  # tidyr::spread(Yterms, estCI) %>%
  pander::pander()

eGFR

ds %>% 
  plot_progress(yvar = "log(eGFR)",
                ylab = "log(eGFR)")

# Complete data

dsComplete %>% 
  plot_progress(yvar = "log(eGFR)",
                ylab = "log(eGFR)")

# ANOVA

anova <- aov(formula = log(eGFR)~fVN, data = dsComplete)
summary(anova)
TukeyHSD(anova)
rm(anova)

# GEE see above code chunk (ACR)

UDBP

ds %>% 
  plot_progress(yvar = "log(udbpCrRatio)",
                ylab = "log(UDBP:Cr)")

# Complete data

dsComplete %>% 
  plot_progress(yvar = "log(udbpCrRatio)",
                ylab = "log(UDBP:Cr)")

# ANOVA

anova <- aov(formula = log(udbpCrRatio)~fVN, data = dsComplete)
summary(anova)
TukeyHSD(anova)
rm(anova)
# Transformed using log
ds %>% 
  dplyr::select(udbpCrRatio, UDBP, fVN) %>% 
  box_plot("fVN", "log(udbpCrRatio)",
           "Visit Number", "log UDBP:Creatinine")

# ANOVA Transformed
anova <- aov(formula = log(udbpCrRatio)~fVN, data = ds)
summary(anova)
TukeyHSD(anova)
rm(anova)

# Untransformed
ds %>% 
  dplyr::select(udbpCrRatio, UDBP, fVN) %>% 
  box_plot("fVN", "udbpCrRatio",
           "Visit Number", "UDBP:Creatinine")

# ANOVA Untransformed
anova <- aov(formula = udbpCrRatio~fVN, data = ds)
summary(anova)
TukeyHSD(anova)
rm(anova)

# n
ds %>% 
  group_by(fMedsBP) %>% 
  summarise(n = n())

# LOESS curve
ds %>% 
  scatter_plot("VN", "log(UDBP)", 
               "Visit Number", "log(UDBP)")

# Plot individual progression with mean
plot_progress_by(ds, byvar = "Sex")

# Plot subset of individual progression with mean
ds %>% 
  dplyr::filter(Hypertension == 0) %>% 
  plot_progress_data(byvar = "fMedsBP")

# Interaction between BP medication and hypertension
ds %>% 
  prep_mason_data() %>% 
  mason_gee(y = c("UDBP"),
              x = "MedsBloodPressure",
              covars = c("VN", "ageBase", "Sex", "Ethnicity", "BMI", "fDM", "Hypertension"),
            intvar = "Hypertension") %>% 
  dplyr::select(Yterms, Xterms, term, p.value, conf.low, conf.high, sample.total)

Generalized Estimating Equations

GEE where predictor is baseline UDBP

# Predictor is baseline UDBP ----------------------------------------

gee_baseline <- ds %>% 
  prep_mason_data_kidney() %>% 
  mason_gee(y = c("ACR", "eGFR"),
            x = "udbpBase",
            covars = c("MonthsFromBaseline", "ageBase", "Sex", "Ethnicity", "fPreDM", "fDysglycemia")) %>%
  mason::polish_renaming(rename_gee_kidney)

# GEE table ----------------------------------------------------------

gee_baseline %>% 
  dplyr::filter(!term == "(Intercept)") %>%
  dplyr::mutate(p = round(p.value, 2),
    p = ifelse(p == "0", "<0.001", p),
    estCI = paste0(round(estimate, 2), " (",
                               round(conf.low, 2), ", ",
                               round(conf.high, 2), ")")) %>% 
  dplyr::select(Yterms, Xterms, term, estCI, p) %>% 
  # tidyr::spread(Yterms, estCI) %>%
  pander::pander()

# Plot ---------------------------------------------------------------

plot_gee_results_kidney(gee_baseline,
                 yvars = c("uAlbumin:creatinine (mg/mmol)", 
                           "eGFR (ml/min/1.73m^2)"))

GEE where predictor is UDBP over time

# Predictor is UDBP at all time points ------------------------------

gee <- ds %>% 
  prep_mason_data_kidney() %>% 
  mason_gee(y = c("ACR", "eGFR"),
              x = "UDBP",
              covars = c("MonthsFromBaseline", "ageBase", "Sex", "Ethnicity", "fPreDM", "fDysglycemia")) %>%
  dplyr::filter(!term == "(Intercept)") %>%
  dplyr::select(Yterms, Xterms, term, estimate, p.value, conf.low, conf.high, std.error)

# GEE table ----------------------------------------------------------

gee %>% 
  dplyr::mutate(p = round(p.value, 2),
    p = ifelse(p == "0", "<0.001", p),
    estCI = paste0(round(estimate, 2), " (",
                               round(conf.low, 2), ", ",
                               round(conf.high, 2), ")")) %>% 
  dplyr::select(Yterms, Xterms, term, estCI, p) %>% 
  # tidyr::spread(Yterms, estCI) %>%
  pander::pander()

# Plot ---------------------------------------------------------------

plot_gee_results_kidney(gee,
                 yvars = c("uAlbumin:creatinine (mg/mmol)", 
                           "eGFR (ml/min/1.73m^2)"))

Interaction with Time

# Unadjusted interaction with visit number
ds %>% 
  prep_mason_data() %>% 
  mason_gee(y = c("ACR", "eGFR"),
              x = "UDBP",
              covars = c("VN"),
              intvar = "VN") %>% 
  dplyr::select(Yterms, Xterms, term, p.value, conf.low, conf.high, sample.total)

# Adjusted interaction with visit number
ds %>% 
  prep_gee_data() %>% 
  analyze_gee(y = c("ACR", "eGFR"),
              x = "UDBP",
              covars = c("VN", "ageBase", "Sex", "Ethnicity", "BMI", "fDM"),
              intvar = "VN") %>% 
  dplyr::select(Yterms, Xterms, term, p.value, conf.low, conf.high, sample.total)

# Unadjusted interaction with months from baseline
ds %>% 
  prep_mason_data() %>% 
  mason_gee(y = c("ACR", "eGFR"),
              x = "UDBP",
              covars = c("MonthsFromBaseline"),
              intvar = "MonthsFromBaseline") %>% 
  dplyr::select(Yterms, Xterms, term, p.value, conf.low, conf.high, sample.total)

# Adjusted interaction with months from baseline
ds %>% 
  prep_mason_data() %>% 
  mason_gee(y = c("ACR", "eGFR"),
              x = "UDBP",
              covars = c("MonthsFromBaseline", "ageBase", "Sex", "Ethnicity", "BMI", "fDM"),
              intvar = "MonthsFromBaseline") %>% 
  dplyr::select(Yterms, Xterms, term, p.value, conf.low, conf.high, sample.total)

PAPER 2: VITAMIN D RESULTS

Subject Characteristics

# Diet information is not available at baseline. Only VN 3 data is available at the present time.

subchar_vitd_base <- tableone::CreateTableOne(
  vars = c("Age",
           "Sex",
           "Ethnicity",
           "BMI",
           "Waist",
           "eGFR",
           "ACR",
           "UrineCreatinine",
           "UrineMicroalbumin",
           "UrinaryCalcium",
           "UDBP",
           "udbpCrRatio",
           "VitaminD",
           "PTH",
           "MET",
           "Systolic",
           "Diastolic",
           "MeanArtPressure",
           "diet_milk",
           "diet_cal",
           "diet_supp_cal",
           "diet_supp_vitd",
           "OralContraceptive",
           "dmStatus"),
  strata = c("vitdStatus"),
  data = dsBase,
  factorVars = c("Sex", "Ethnicity", "OralContraceptive", "dmStatus")
) %>% 
  print(nonnormal = c("UDBP",
                      "ACR",
                      "UrineMicroalbumin"),
        quote = FALSE,
        noSpaces = TRUE)
# Diet information is not available at baseline. Only VN 3 data is available at the present time.

subchar_vitd_base <- tableone::CreateTableOne(
  vars = c("Age",
           "Sex",
           "Ethnicity",
           "BMI",
           "Waist",
           "eGFR",
           "ACR",
           "UrineCreatinine",
           "UrineMicroalbumin",
           "UrinaryCalcium",
           "UDBP",
           "VitaminD",
           "PTH",
           "Systolic",
           "Diastolic",
           "MeanArtPressure",
           "diet_milk",
           "diet_cal",
           "diet_supp_cal",
           "diet_supp_vitd",
           "OralContraceptive",
           "dmStatus"),
  strata = c("fVN"),
  data = ds,
  factorVars = c("Sex", "Ethnicity", "OralContraceptive", "dmStatus")
) %>% 
  print(nonnormal = c("UDBP",
                      "ACR",
                      "UrineMicroalbumin"),
        quote = FALSE,
        noSpaces = TRUE)

Cross-Sectional

# Clean data
vitd <- ds %>% 
  filter(fVN == "Baseline") %>% 
  select(vitdStatus, udbpCrRatio) %>%
  na.omit()

# Box plot of uVDBP in different albuminuria categories
vitd %>% 
  box_plot("vitdStatus", "log(udbpCrRatio)", 
            "Vitamin D Status",
            "log uVDBP:Creatinine")

# n
vitd %>% 
  group_by(vitdStatus) %>% 
  summarise(n = n())

# ANOVA
anova <- aov(formula = log(udbpCrRatio)~vitdStatus, data = vitd)
summary(anova)
TukeyHSD(anova)
rm(anova)
# Scatterplot of ACR and uVDBP ----------------------------------

dsBase %>% 
  scatter_plot("log(udbpCrRatio)", "VitaminD", 
               "log UDBP:Creatinine",
               "Serum 25(OH)D")

# Spearman Correlation ------------------------------------------

dsBase %>% 
  cor.test(formula = ~ VitaminD + udbpCrRatio, data = ., method = "spearman")

# Linear Regression ---------------------------------------------

dsBase %>% 
  prep_mason_data() %>% 
  mason_glm(y = "VitaminD",
            x = "udbpCrRatio",
            covars = c("ageBase", "Sex", "Ethnicity", "MET", "BMI", "Season", "fDM")
            ) %>% 
  dplyr::filter(!term == "(Intercept)") %>%
  dplyr::mutate(p = round(p.value, 2),
    p = ifelse(p == "0", "<0.001", p),
    estCI = paste0(round(estimate, 2), " (",
                               round(conf.low, 2), ", ",
                               round(conf.high, 2), ")")) %>% 
  dplyr::select(Yterms, Xterms, term, estCI, p) %>% 
  # tidyr::spread(Yterms, estCI) %>%
  pander::pander()

PTH

# Scatterplot

dsBase %>% 
  scatter_plot("PTH", "VitaminD", 
               "Parathyroid Hormone (pmol/L)",
               "Serum 25(OH)D (nmol/L)")

# Linear Regression ---------------------------------------------

dsBase %>% 
  prep_mason_data() %>% 
  mason_glm(y = "VitaminD",
            x = "PTH"
            ) %>% 
  dplyr::filter(!term == "(Intercept)") %>%
  dplyr::mutate(p = round(p.value, 2),
    p = ifelse(p == "0", "<0.001", p),
    estCI = paste0(round(estimate, 2), " (",
                               round(conf.low, 2), ", ",
                               round(conf.high, 2), ")")) %>% 
  dplyr::select(Yterms, Xterms, term, estCI, p) %>% 
  # tidyr::spread(Yterms, estCI) %>%
  pander::pander()

Progression

ds %>% 
  plot_progress(yvar = "VitaminD",
                ylab = "Serum 25(OH)D")

# Complete data

dsComplete %>% 
  plot_progress(yvar = "VitaminD",
                ylab = "Serum 25(OH)D")

Generalized Estimating Equations

# Predictor is baseline UDBP ----------------------------------------

gee_vitd_baseline <- ds %>% 
  prep_mason_data_kidney() %>% 
  mason_gee(y = c("VitaminD"),
            x = "udbpBase",
            covars = c("MonthsFromBaseline", "ageBase", "Sex", "Ethnicity", "BMI", "fDM", "Season"),
            intvar = "Season")

# GEE table ----------------------------------------------------------

gee_vitd_baseline %>% 
  dplyr::filter(!term == "(Intercept)") %>% 
  dplyr::mutate(p = round(p.value, 2),
    p = ifelse(p == "0", "<0.001", p),
    estCI = paste0(round(estimate, 2), " (",
                               round(conf.low, 2), ", ",
                               round(conf.high, 2), ")")) %>% 
  dplyr::select(Yterms, Xterms, term, estCI, p) %>% 
  # tidyr::spread(Yterms, estCI) %>%
  pander::pander()

# Plot ---------------------------------------------------------------

plot_gee_results_kidney(gee_vitd_baseline,
                 yvars = c("uAlbumin:creatinine (mg/mmol)", 
                           "eGFR (ml/min/1.73m^2)"))
# Predictor is baseline UDBP ----------------------------------------

gee <- ds %>% 
  prep_mason_data() %>% 
  mason_gee(y = c("VitaminD"),
            x = "udbpBase",
            covars = c("VN", "ageBase", "Sex", "Ethnicity", "BMI", "PTH", "fDM"))
  # dplyr::filter(!term == "(Intercept)") %>%
  # dplyr::select(Yterms, Xterms, term, estimate, p.value, conf.low, conf.high, std.error, sample.total)
  # knitr::kable()

# Predictor is UDBP at all time points ------------------------------

gee <- ds %>% 
  prep_mason_data() %>% 
  mason_gee(y = c("VitaminD"),
              x = "UDBP",
              covars = c("VN", "ageBase", "Sex", "Ethnicity", "BMI", "PTH", "fDM")) %>%
  dplyr::filter(!term == "(Intercept)") %>%
  dplyr::select(Yterms, Xterms, term, estimate, p.value, conf.low, conf.high, std.error, sample.total)
plot_gee_results_vitd(gee,
                 yvars = c("VitaminD"))

Discussion

Acknowledgements

References



windyzn/urinaryDBP documentation built on May 4, 2019, 6:32 a.m.