Enrollment.Rmd
This package vignette demonstrates how to use the ADNIMERGE package to generate simple enrollment and longitudinal summaries and plots with R and knitr.
Report generated from Enrollment.Rmd
options(digits = 3)
library(knitr)
library(ADNIMERGE)
library(ggplot2)
library(Hmisc)
library(gridExtra)
library(RColorBrewer)
library(tidyverse)
library(kableExtra)
source("https://adni.bitbucket.io/myfunctions.R")
theme_set(theme_bw())
c("#2b8cbe", "#74a9cf", "#fdcc8a", "#fc8d59", "#e34a33")
dxpal <- function(...) scale_colour_manual(..., values = dxpal)
scale_colour_discrete <- function(...) scale_fill_manual(..., values = dxpal) scale_fill_discrete <-
CN (N=534) | SMC (N=351) | EMCI (N=411) | LMCI (N=678) | AD (N=401) | Total (N=2375) | p value | |
---|---|---|---|---|---|---|---|
Age | < 0.0011 | ||||||
N-Miss | 1 | 0 | 1 | 2 | 0 | 4 | |
Mean (SD) | 73.323 (6.366) | 70.546 (6.798) | 71.272 (7.419) | 73.726 (7.472) | 74.701 (7.925) | 72.905 (7.347) | |
Range | 55.100 - 89.600 | 50.400 - 90.300 | 55.000 - 89.100 | 55.000 - 91.400 | 55.100 - 90.900 | 50.400 - 91.400 | |
Age | |||||||
N-Miss | 1 | 0 | 1 | 2 | 0 | 4 | |
(39,49] | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | |
(49,59] | 11 (2.1%) | 17 (4.8%) | 19 (4.6%) | 20 (3.0%) | 17 (4.2%) | 84 (3.5%) | |
(59,69] | 106 (19.9%) | 150 (42.7%) | 145 (35.4%) | 147 (21.7%) | 67 (16.7%) | 615 (25.9%) | |
(69,79] | 321 (60.2%) | 146 (41.6%) | 180 (43.9%) | 336 (49.7%) | 188 (46.9%) | 1171 (49.4%) | |
(79,89] | 94 (17.6%) | 34 (9.7%) | 65 (15.9%) | 169 (25.0%) | 122 (30.4%) | 484 (20.4%) | |
(89,99] | 1 (0.2%) | 4 (1.1%) | 1 (0.2%) | 4 (0.6%) | 7 (1.7%) | 17 (0.7%) | |
(99,109] | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | |
Sex | < 0.0012 | ||||||
Female | 282 (52.8%) | 220 (62.7%) | 187 (45.5%) | 261 (38.5%) | 175 (43.6%) | 1125 (47.4%) | |
Male | 252 (47.2%) | 131 (37.3%) | 224 (54.5%) | 417 (61.5%) | 226 (56.4%) | 1250 (52.6%) | |
Education | < 0.0011 | ||||||
Mean (SD) | 16.412 (2.613) | 16.681 (2.336) | 16.024 (2.640) | 15.968 (2.833) | 15.212 (2.905) | 16.055 (2.731) | |
Range | 6.000 - 20.000 | 8.000 - 20.000 | 10.000 - 20.000 | 4.000 - 20.000 | 4.000 - 20.000 | 4.000 - 20.000 | |
Marital | < 0.0012 | ||||||
N-Miss | 0 | 0 | 1 | 0 | 0 | 1 | |
Divorced | 57 (10.7%) | 48 (13.7%) | 45 (11.0%) | 59 (8.7%) | 14 (3.5%) | 223 (9.4%) | |
Married | 366 (68.5%) | 244 (69.5%) | 315 (76.8%) | 525 (77.4%) | 338 (84.3%) | 1788 (75.3%) | |
Never married | 32 (6.0%) | 20 (5.7%) | 18 (4.4%) | 13 (1.9%) | 11 (2.7%) | 94 (4.0%) | |
Unknown | 1 (0.2%) | 2 (0.6%) | 4 (1.0%) | 2 (0.3%) | 0 (0.0%) | 9 (0.4%) | |
Widowed | 78 (14.6%) | 37 (10.5%) | 28 (6.8%) | 79 (11.7%) | 38 (9.5%) | 260 (11.0%) | |
Ethnicity | 0.0992 | ||||||
Unknown | 2 (0.4%) | 2 (0.6%) | 2 (0.5%) | 3 (0.4%) | 3 (0.7%) | 12 (0.5%) | |
Not Hisp/Latino | 507 (94.9%) | 321 (91.5%) | 387 (94.2%) | 652 (96.2%) | 384 (95.8%) | 2251 (94.8%) | |
Hisp/Latino | 25 (4.7%) | 28 (8.0%) | 22 (5.4%) | 23 (3.4%) | 14 (3.5%) | 112 (4.7%) | |
Race | < 0.0012 | ||||||
Am Indian/Alaskan | 2 (0.4%) | 0 (0.0%) | 2 (0.5%) | 1 (0.1%) | 0 (0.0%) | 5 (0.2%) | |
Asian | 13 (2.4%) | 16 (4.6%) | 7 (1.7%) | 12 (1.8%) | 10 (2.5%) | 58 (2.4%) | |
Hawaiian/Other PI | 0 (0.0%) | 0 (0.0%) | 1 (0.2%) | 1 (0.1%) | 0 (0.0%) | 2 (0.1%) | |
Black | 47 (8.8%) | 51 (14.5%) | 17 (4.1%) | 38 (5.6%) | 22 (5.5%) | 175 (7.4%) | |
White | 469 (87.8%) | 269 (76.6%) | 373 (90.8%) | 618 (91.2%) | 365 (91.0%) | 2094 (88.2%) | |
More than one | 2 (0.4%) | 12 (3.4%) | 7 (1.7%) | 4 (0.6%) | 4 (1.0%) | 29 (1.2%) | |
Unknown | 1 (0.2%) | 3 (0.9%) | 4 (1.0%) | 4 (0.6%) | 0 (0.0%) | 12 (0.5%) | |
Amyloid Status | < 0.0012 | ||||||
N-Miss | 125 | 40 | 15 | 225 | 94 | 499 | |
Negative | 121 (29.6%) | 145 (46.6%) | 71 (17.9%) | 67 (14.8%) | 17 (5.5%) | 421 (22.4%) | |
Positive | 288 (70.4%) | 166 (53.4%) | 325 (82.1%) | 386 (85.2%) | 290 (94.5%) | 1455 (77.6%) | |
CDR-SB | < 0.0011 | ||||||
Mean (SD) | 0.030 (0.123) | 0.051 (0.157) | 1.316 (0.867) | 1.634 (0.949) | 4.448 (1.688) | 1.460 (1.774) | |
Range | 0.000 - 1.000 | 0.000 - 1.000 | 0.000 - 6.000 | 0.000 - 5.500 | 1.000 - 10.000 | 0.000 - 10.000 | |
ADAS 13 | < 0.0011 | ||||||
N-Miss | 0 | 4 | 3 | 3 | 8 | 18 | |
Mean (SD) | 8.961 (4.363) | 8.628 (4.345) | 12.847 (5.399) | 18.517 (6.638) | 29.872 (7.987) | 15.808 (9.496) | |
Range | 0.000 - 24.670 | 0.670 - 26.330 | 2.000 - 29.000 | 0.670 - 39.670 | 12.670 - 54.670 | 0.000 - 54.670 | |
MMSE | < 0.0011 | ||||||
N-Miss | 0 | 1 | 0 | 0 | 0 | 1 | |
Mean (SD) | 29.066 (1.130) | 29.083 (1.161) | 28.226 (1.650) | 27.201 (1.888) | 23.155 (2.193) | 27.392 (2.646) | |
Range | 24.000 - 30.000 | 24.000 - 30.000 | 21.000 - 30.000 | 19.000 - 30.000 | 16.000 - 30.000 | 16.000 - 30.000 |
Min. | X1st.Qu. | Median | Mean | X3rd.Qu. | Max. | N | |
---|---|---|---|---|---|---|---|
CN | 0.00 | 5.67 | 9.0 | 8.96 | 12.0 | 24.7 | 534 |
SMC | 0.67 | 5.33 | 8.0 | 8.63 | 11.5 | 26.3 | 347 |
EMCI | 2.00 | 9.00 | 12.0 | 12.85 | 16.0 | 29.0 | 408 |
LMCI | 0.67 | 13.67 | 18.3 | 18.52 | 23.3 | 39.7 | 675 |
AD | 12.67 | 24.00 | 29.3 | 29.87 | 34.3 | 54.7 | 393 |
Min. | X1st.Qu. | Median | Mean | X3rd.Qu. | Max. | N | |
---|---|---|---|---|---|---|---|
CN | 24 | 29 | 29 | 29.1 | 30 | 30 | 534 |
SMC | 24 | 29 | 29 | 29.1 | 30 | 30 | 350 |
EMCI | 21 | 27 | 29 | 28.2 | 29 | 30 | 411 |
LMCI | 19 | 26 | 27 | 27.2 | 29 | 30 | 678 |
AD | 16 | 21 | 23 | 23.2 | 25 | 30 | 401 |
Min. | X1st.Qu. | Median | Mean | X3rd.Qu. | Max. | N | |
---|---|---|---|---|---|---|---|
CN | 0 | 0.0 | 0.0 | 0.0300 | 0 | 1.0 | 534 |
SMC | 0 | 0.0 | 0.0 | 0.0513 | 0 | 1.0 | 351 |
EMCI | 0 | 0.5 | 1.0 | 1.3163 | 2 | 6.0 | 411 |
LMCI | 0 | 1.0 | 1.5 | 1.6342 | 2 | 5.5 | 678 |
AD | 1 | 3.5 | 4.5 | 4.4476 | 5 | 10.0 | 401 |
Min. | X1st.Qu. | Median | Mean | X3rd.Qu. | Max. | N | |
---|---|---|---|---|---|---|---|
CN | 1 | 1.12 | 1.38 | 1.44 | 1.62 | 2.88 | 308 |
SMC | 1 | 1.38 | 1.75 | 1.80 | 2.12 | 3.62 | 350 |
EMCI | 1 | 1.75 | 2.25 | 2.28 | 2.78 | 4.00 | 408 |
LMCI | 1 | 1.81 | 2.25 | 2.35 | 2.88 | 4.00 | 283 |
AD | 1 | 1.88 | 2.38 | 2.42 | 3.00 | 4.00 | 212 |