Algorithm Comparison

Run algorithm on our sample of weights weightSamples. For simplicity, will subset the data to include only patients from 2016.

#--------------------------------- Janney 2016 -------------------------------#

Janney2016.df <- Janney2016.f(DF = DF,
                              id = "PatientICN",
                              measures = "Weight",
                              tmeasures = "WeightDateTime",
                              startPoint = "VisitDateTime")

#-------------------------------- Littman 2012 -------------------------------#

Littman2012.df <- Littman2012.f(DF = DF,
                                id = "PatientICN",
                                measures = "Weight",
                                tmeasures = "WeightDateTime")

#------------------------------ Maciejewski 2016 -----------------------------#

maciejewski <- Maciejewski2016.df # make copy
Maciejewski2016.df <- Maciejewski2016.df %>% filter(PatientICN %in% samp[[1]])

#-------------------------------- Breland 2017 -------------------------------#

Breland2017.df <- Breland2017.f(DF = DF,
                                id = "PatientICN",
                                measures = "Weight",
                                tmeasures = "WeightDateTime")

#-------------------------------- Maguen 2013 --------------------------------#

Maguen2013.df <- Maguen2013.f(DF = DF,
                              id = "PatientICN",
                              measures = "Weight",
                              tmeasures = "WeightDateTime",
                              variables = c("AgeAtVisit", "Gender"))

#------------------------------- Goodrich 2016 -------------------------------#

Goodrich2016.df <- Goodrich2016.f(DF = DF,
                                  id = "PatientICN",
                                  measures = "Weight",
                                  tmeasures = "WeightDateTime",
                                  startPoint = "VisitDateTime")

#----------------------------- Chan & Raffa 2017 -----------------------------#

Chan2017.df <- Chan2017.f(DF = DF,
                          id = "PatientICN",
                          measures = "Weight",
                          tmeasures = "WeightDateTime")

#------------------------------- Jackson 2015 --------------------------------#

Jackson2015.df <- Jackson2015.f(DF = DF,
                                id = "PatientICN",
                                measures = "Weight",
                                tmeasures = "WeightDateTime",
                                startPoint = "VisitDateTime")

#--------------------------------- Buta 2018 ---------------------------------#

# Attach and compute BMI
DF <- DF %>%
    left_join(
      ModeOfHeight %>%
        select(-freq),
      by = "PatientICN"
    ) %>%
    mutate(BMI = 703 * Weight / (Height ^ 2))

Buta2018.df <- Buta2018.f(DF = DF,
                          id = "PatientICN",
                          measures = "BMI",
                          tmeasures = "WeightDateTime")

#------------------------------ Kazerooni 2016 -------------------------------#

Kazerooni2016.df <- Kazerooni2016.f(DF = DF,
                                    id = "PatientICN",
                                    measures = "Weight",
                                    tmeasures = "WeightDateTime",
                                    startPoint = "VisitDateTime")

#-------------------------------- Noel 2012 ----------------------------------#

Noel2012.df <- Noel2012.f(DF = DF,
                          id = "PatientICN",
                          measures = "Weight",
                          tmeasures = "WeightDateTime")

#----------------------------- Rosenberger 2011 ------------------------------#

Rosenberger2011.df <- Rosenberger2011.f(DF = DF,
                                        id = "PatientICN", 
                                        tmeasures = "WeightDateTime",
                                        startPoint = "VisitDateTime",
                                        pad = 1)

Comparison of Algorithms depicting algorithm-removed weights (red) juxtaposed with raw weight data (black):