This document contains information on survival in the studies used in this coordinated analysis. Specifically, we count the number of participants who survived and who died, the surival time for those who died, and the survival time for those who lived.
Sample | N | Percent of full sample | Mean | SD | Min | Max |
---|---|---|---|---|---|---|
EAS | ||||||
full | 574 | 48.56 | 30.59 | 2.00 | 133.00 | |
died | 128 | 22.30 | 51.15 | 29.39 | 2.00 | 122.00 |
HRS | ||||||
full | 19211 | 64.03 | 28.05 | 1.00 | 109.57 | |
died | 3066 | 15.96 | 45.11 | 25.90 | 1.00 | 104.53 |
LBC1936 | ||||||
full | 962 | 133.75 | 31.34 | 2.10 | 170.80 | |
died | 218 | 22.66 | 90.59 | 40.03 | 2.10 | 161.13 |
LBLS | ||||||
full | 898 | 170.23 | 42.21 | 12.00 | 228.00 | |
died | 131 | 14.59 | 113.40 | 41.15 | 12.00 | 204.00 |
MAP | ||||||
full | 653 | 115.12 | 35.81 | 15.44 | 166.74 | |
died | 268 | 41.04 | 95.99 | 31.43 | 15.44 | 160.69 |
MAS | ||||||
full | 879 | 71.74 | 23.06 | 0.00 | 101.04 | |
died | 180 | 20.48 | 52.84 | 24.91 | 3.84 | 95.52 |
MIDUS | ||||||
full | 6245 | 228.74 | 50.14 | 1.00 | 253.50 | |
died | 1069 | 17.12 | 135.32 | 64.20 | 1.00 | 245.13 |
NAS | ||||||
full | 992 | 228.98 | 83.88 | 21.60 | 322.80 | |
died | 659 | 66.43 | 186.95 | 72.98 | 21.60 | 313.20 |
OATS | ||||||
full | 534 | 48.93 | 28.99 | 0.00 | 114.87 | |
died | 56 | 10.49 | 63.76 | 28.53 | 4.11 | 114.87 |
ROS | ||||||
full | 1394 | 126.29 | 81.32 | 1.05 | 288.00 | |
died | 792 | 56.81 | 120.75 | 70.73 | 1.05 | 287.70 |
SLS | ||||||
full | 1649 | 140.72 | 61.37 | 1.67 | 194.23 | |
died | 444 | 26.93 | 64.47 | 46.14 | 1.67 | 189.90 |
WLS | ||||||
full | 10711 | 250.15 | 47.99 | 3.00 | 268.00 | |
died | 1777 | 16.59 | 160.42 | 65.05 | 3.00 | 264.00 |
The following packages were used to generate this table:
library(papaja)
library(tidyverse)
library(knitr)
library(kableExtra)
library(here)
The files needed for this table are available at osf.io/mzfu9 in the Individual Study Output folder.
First we load the individual study analysis objects.
study.names = c("EAS", "HRS", "LBC", "LBLS", "MAP", "MAS", "MIDUS", "NAS", "OATS", "ROS", "SLS", "WLS")
lapply(here(paste0("mortality/study output/", study.names, "_survival_output.Rdata")), load, .GlobalEnv)
Next we extract the relevant statistics for each study.
survival.df = data.frame(study = study.names)
survival.df$full = lapply(X = paste0(study.names, "_survival_output"),
FUN = function(x) get(x)$descriptives$survival_full)
survival.df$died = lapply(X = paste0(study.names, "_survival_output"),
FUN = function(x) get(x)$descriptives$survival_died)
survival.df = survival.df %>%
gather(key = "sample", value = "value", -study) %>%
unnest() %>%
group_by(study) %>%
mutate(percent = case_when(sample == "died" ~ n/max(n)*100)) %>%
dplyr::select(study, sample, n, percent, mean, sd, min, max) %>%
arrange(study) %>%
ungroup()
We identify the rows for each variable.
rows.EAS = which(survival.df$study == "EAS"); rows.EAS = c(min(rows.EAS), max(rows.EAS))
rows.HRS = which(survival.df$study == "HRS"); rows.HRS = c(min(rows.HRS), max(rows.HRS))
rows.LBC = which(survival.df$study == "LBC"); rows.LBC = c(min(rows.LBC), max(rows.LBC))
rows.LBLS = which(survival.df$study == "LBLS"); rows.LBLS = c(min(rows.LBLS), max(rows.LBLS))
rows.MAP = which(survival.df$study == "MAP"); rows.MAP = c(min(rows.MAP), max(rows.MAP))
rows.MAS = which(survival.df$study == "MAS"); rows.MAS = c(min(rows.MAS), max(rows.MAS))
rows.MIDUS = which(survival.df$study == "MIDUS"); rows.MIDUS = c(min(rows.MIDUS), max(rows.MIDUS))
rows.NAS = which(survival.df$study == "NAS"); rows.NAS = c(min(rows.NAS), max(rows.NAS))
rows.OATS = which(survival.df$study == "OATS"); rows.OATS = c(min(rows.OATS), max(rows.OATS))
rows.ROS = which(survival.df$study == "ROS"); rows.ROS = c(min(rows.ROS), max(rows.ROS))
rows.SLS = which(survival.df$study == "SLS"); rows.SLS = c(min(rows.SLS), max(rows.SLS))
rows.WLS = which(survival.df$study == "WLS"); rows.WLS = c(min(rows.WLS), max(rows.WLS))
survival.df %>%
dplyr::select(-study) %>%
kable(., booktabs = TRUE, escape = F, digits = 2, format = "html",
col.names = c("Sample", "N", "Percent of full sample",
"Mean", "SD", "Min", "Max")) %>%
kable_styling(full_width = T, latex_options = c("repeat_header")) %>%
add_header_above(c(" "=3, "Surival Time (in months)" = 4)) %>%
group_rows("EAS", rows.EAS[1], rows.EAS[2]) %>%
group_rows("HRS", rows.HRS[1], rows.HRS[2]) %>%
group_rows("LBC1936", rows.LBC[1], rows.LBC[2]) %>%
group_rows("LBLS", rows.LBLS[1], rows.LBLS[2]) %>%
group_rows("MAP", rows.MAP[1], rows.MAP[2]) %>%
group_rows("MAS", rows.MAS[1], rows.MAS[2]) %>%
group_rows("MIDUS", rows.MIDUS[1], rows.MIDUS[2]) %>%
group_rows("NAS", rows.NAS[1], rows.NAS[2]) %>%
group_rows("OATS", rows.OATS[1], rows.OATS[2]) %>%
group_rows("ROS", rows.ROS[1], rows.ROS[2]) %>%
group_rows("SLS", rows.SLS[1], rows.SLS[2]) %>%
group_rows("WLS", rows.WLS[1], rows.WLS[2])