library(ggplot2)
library(dplyr)
library(table1)


d0 <- readRDS('baseline_20200617.rds')
long0 <- readRDS('thbp_7yr_long_20200617.rds')

Demographics

Baseline

Exclusions: participants who nominated membership in intervention group who did not complete two or more university units (25% FTE), participants in control group who completed any university study after the study began, and any participants who were higher degree by research candidates (indicating recent university study).

table1(~age_1 + age_group + gender + all_courses_post2010_cp + wtar_fsiq + mhq_edschool + pcr | group,
       d0,
       render.continuous = c(.= "Mean (SD)", .= "Median [Q1, Q3]"),
       overall = FALSE)
Control
(n=102)
Intervention
(n=383)
Age
Mean (SD) 63.2 (6.65) 59.6 (6.64)
Median [Q1, Q3] 64.0 [58.0, 68.0] 59.0 [54.0, 64.0]
Age group
50-59 years 32 (31.4%) 201 (52.5%)
60-69 years 51 (50.0%) 154 (40.2%)
70-79 years 19 (18.6%) 28 (7.3%)
Gender
Female 66 (64.7%) 269 (70.2%)
Male 36 (35.3%) 114 (29.8%)
THBP academic course load (% of 1-year FTE load)
Mean (SD) 0.00 (0.00) 145 (123)
Median [Q1, Q3] 0.00 [0.00, 0.00] 113 [50.0, 206]
WTAR FSIQ
Mean (SD) 112 (4.86) 112 (5.71)
Median [Q1, Q3] 114 [109, 116] 114 [110, 116]
Early-life education (years)
Mean (SD) 11.0 (1.16) 11.3 (0.979)
Median [Q1, Q3] 12.0 [10.0, 12.0] 12.0 [10.0, 12.0]
Prior Cognitive Reserve (z)
Mean (SD) -0.165 (1.05) 0.0398 (0.955)
Median [Q1, Q3] 0.0186 [-0.758, 0.568] 0.0522 [-0.484, 0.730]

At each assessment

table1(~age_1 + age_group + gender + group + pcr | title*phase_f,
       group_by(long0, phase_f) %>% filter(!duplicated(idcode)),
       overall = FALSE,
       render.continuous = c(.= "Mean (SD)"))
Years since baseline
0
(n=485)
1
(n=388)
2
(n=393)
3
(n=361)
5
(n=308)
7
(n=149)
Age (years)
Mean (SD) 60.3 (6.80) 61.7 (6.76) 62.7 (6.61) 63.5 (6.68) 65.2 (6.63) 68.4 (6.50)
Age group
50-59 years 233 (48.0%) 157 (40.5%) 135 (34.4%) 117 (32.4%) 77 (25.0%) 20 (13.4%)
60-69 years 205 (42.3%) 179 (46.1%) 195 (49.6%) 170 (47.1%) 144 (46.8%) 55 (36.9%)
70-79 years 47 (9.7%) 52 (13.4%) 61 (15.5%) 72 (19.9%) 81 (26.3%) 69 (46.3%)
80+ years 0 (0%) 0 (0%) 2 (0.5%) 2 (0.6%) 6 (1.9%) 5 (3.4%)
gender
Female 335 (69.1%) 262 (67.5%) 265 (67.4%) 243 (67.3%) 208 (67.5%) 108 (72.5%)
Male 150 (30.9%) 126 (32.5%) 128 (32.6%) 118 (32.7%) 100 (32.5%) 41 (27.5%)
group
Control 102 (21.0%) 82 (21.1%) 85 (21.6%) 76 (21.1%) 63 (20.5%) 40 (26.8%)
Intervention 383 (79.0%) 306 (78.9%) 308 (78.4%) 285 (78.9%) 245 (79.5%) 109 (73.2%)
Prior Cognitive Reserve (z)
Mean (SD) -0.00334 (0.977) 0.0187 (0.978) 0.0551 (0.961) 0.0171 (0.952) -0.0341 (0.949) 0.0925 (0.826)
att_t6 <- round(1-(1+(308-485)/485)^(1/5),3)*100
att_t8 <- round(1-(1+(149-485)/485)^(1/7),3)*100

Annualised attrition up to assessment at year 5 was 8.7% p.a., and counting incomplete assessments at year 7, 15.5% p.a..

Cognitive tests

test_names <- c(
  `ravlt_t15_tot_z` = "RAVLT tot",
  `ravlt_arcl_raw_z` = "RAVLT rcl",
  `rcft_rcl_raw_z` = "RCFT",
  `lmi_unit_tot_z` = "LMi",
  `lmii_unit_tot_z` = "LMii",
  `reversed_log_pal_te6_score_z` = "PAL te6",
  `cowat_tot_z` = "COWAT",
  `wais_ds_raw_z` = "WAIS ds",
  `reversed_log_tmt_b_time_z` = "TMT-B",
  `pal_ftm_score_z` = "PAL ftm",
  `ssp_len_z` = "SSP length",
  `ssp_te_z` = "SSP tot errors",
  `reversed_log_swm_be_z` = "SWM be",
  `reversed_log_stroop_c_time_z` = "STROOP C time",
  `rvp_a_z` = "RVP-A",
  `reversed_log_bnt_raw_z` = "BNT",
  `wais_com_raw_z` = "WAIS comp",
  `wais_lns_raw_z` = "WAIS lns",
  `reversed_log_wais_voc_raw_z` = "WAIS voc",
  `-1.1` = "55 years of age",
  `0.3` = "65 years of age",
  `1.7` = "75 years of age"
)

library(openxlsx)
test_instruments <- read.xlsx("instrument_table_2.xlsx", sheet = 1)
names(test_instruments) <- c("Label", "Instrument", "Cognitive function/s assessed", "References")

#gt::gt(test_instruments)
sjPlot::tab_df(test_instruments)
Label Instrument Cognitive function/s assessed References
BNT Boston Naming Test Verbal confrontation naming, language fluency Kaplan, E., Goodglass, H., & Weintraub, S. (1983). Boston Naming Test. Philadelphia, PA: Lea & Febiger.
COWAT Controlled Oral Word Association Test Letter verbal fluency, verbal executive function Lezak, M. D., Howieson, D. B., Bigler, E. D., & Tranel, D. (2012). Neuropsychological assessment (5th ed.). Oxford: Oxford University Press.
LM I & II Logical memory I & II Immediate and delayed recall of verbal prose passages; verbal episodic memory Wechsler, D. (1997). Wechsler memory scale - third edition (WMS-III): Administration and scoring manual. San Antonio, TX: The Psychological Corporation
PAL ftm Paired associates learning (first trial memory score) Immediate recall of visual information; visual episodic memory Cambridge Cognition Ltd. (2004). CANTABeclipse. Cambridge, UK: Cambridge Cognition Ltd.
PAL te6 Paired associates learning (total errors, 6 shapes) recall of visual information on 6 shapes trial; visual episodic memory recall Cambridge Cognition Ltd. (2004). CANTABeclipse. Cambridge, UK: Cambridge Cognition Ltd.
RAVLT rcl Rey auditory verbal learning test (recall) Immediate recall of verbal word lists; verbal episodic memory recall Lezak, M. D., Howieson, D. B., Bigler, E. D., & Tranel, D. (2012). Neuropsychological assessment (5th ed.). Oxford: Oxford University Press.
RAVLT tot Rey auditory verbal learning test (total) Learning of verbal word lists; verbal episodic learning capacity Lezak, M. D., Howieson, D. B., Bigler, E. D., & Tranel, D. (2012). Neuropsychological assessment (5th ed.). Oxford: Oxford University Press.
RCFT Rey complex figure test Immediate recall of complex geometric design; visual episodic memory recall Lezak, M. D., Howieson, D. B., Bigler, E. D., & Tranel, D. (2012). Neuropsychological assessment (5th ed.). Oxford: Oxford University Press.
RVP-A Rapid visual information processing (A) Visual sustained attention and signal detection sensitivity; visual executive function Cambridge Cognition Ltd. (2004). CANTABeclipse. Cambridge, UK: Cambridge Cognition Ltd.
SSP length Spatial span (length) Visual immediate memory span; visual short term memory capacity Cambridge Cognition Ltd. (2004). CANTABeclipse. Cambridge, UK: Cambridge Cognition Ltd.
STROOP C time Stroop colour (time) Verbal information processing speed and impulse control; executive function Lezak, M. D., Howieson, D. B., Bigler, E. D., & Tranel, D. (2012). Neuropsychological assessment (5th ed.). Oxford: Oxford University Press.
SWM be Spatial working memory Visual working memory capacity Cambridge Cognition Ltd. (2004). CANTABeclipse. Cambridge, UK: Cambridge Cognition Ltd.
TMT-B Trail making test (B) Visuo-motor information processing speed; executive function Lezak, M. D., Howieson, D. B., Bigler, E. D., & Tranel, D. (2012). Neuropsychological assessment (5th ed.). Oxford: Oxford University Press.
WAIS comp Wechsler Adult Intelligence Scale, 3rd edition (comprehension subtest) Capacity to use language to express ideas and understand verbal communication; language capacity Wechsler, D. (1997). Wechsler adult intelligence scale - third edition (WAIS-III): Administration and scoring manual: The Psychological Corporation.
WAIS ds Wechsler Adult Intelligence Scale, 3rd edition (digit span subtest) Verbal immediate memory span; verbal short term memory capacity Wechsler, D. (1997). Wechsler adult intelligence scale - third edition (WAIS-III): Administration and scoring manual: The Psychological Corporation.
WAIS lns Wechsler Adult Intelligence Scale, 3rd edition (letter-number sequence subtest) Verbal working memory capacity Wechsler, D. (1997). Wechsler adult intelligence scale - third edition (WAIS-III): Administration and scoring manual: The Psychological Corporation.
WAIS voc Wechsler Adult Intelligence Scale, 3rd edition (vocabulary subtest) Word recognition and capacity to define words; lanaguage capacity Wechsler, D. (1997). Wechsler adult intelligence scale - third edition (WAIS-III): Administration and scoring manual: The Psychological Corporation.
ggplot(dplyr::filter(long0, phase == 1), aes(x = age_1, y = value)) +
  geom_smooth(method = "lm", formula = y ~ poly(x, 2)) +
  scale_color_manual(values = c("orange3", "slategrey")) +
  facet_wrap(~test, labeller = as_labeller(test_names)) +
  xlab("Age (years)") +
  ylab("Score (z)") +
  theme_bw()