# long dataset
df_long <-
df %>% select(
record_id,
group.use,
Sex,
Age,
tot_ctq,
tot_tleq_nonW,
exposures_count,
ptsd,
(contains("_pc") |
contains("_Asym") |
contains("_cm3")) &
!contains("scid")
) #scid pcp shouldn't be included
df_long <- df_long %>%
tidyr::pivot_longer(
cols = -c(
record_id,
group.use,
Sex,
Age,
tot_ctq,
tot_tleq_nonW,
exposures_count,
ptsd,
ICV_cm3
),
names_to = "region",
values_to = "value"
)
df_long[12:14] <-
str_split_fixed(df_long$region, "_", 3) # split column into 3 columns, by underscore
df_long <-
df_long %>% select(!region) %>% rename(region = V1,
lat = V2,
measure = V3) # which subfield, which hemisphere, which metric (cm3, percent, asymmetry index)
df_long1 <-
df_long %>% filter(!measure == "" &
!lat == "total" &
measure == "cm3" &
!region == "Hippocampus") # don't include total hippocampus
df_long2 <-
df_long %>% filter(!measure == "" &
!lat == "total" &
measure == "pc" & !region == "Hippocampus") %>% group_by(region) %>%
mutate(z_value = scale(value))
df_long3 <-
df_long %>% filter(lat == "asymmetry" & !region == "Hippocampus")
For pairwise comparisons: P value threshold, corrected for multiple comparisons = .05/(5 regions x 2 hemispheres) = .005
# MODEL 1: Volume in cm^3 controlling for total ICV
m1 <-
aov_ez(
id = "record_id",
dv = "value",
df_long1,
between = c("group.use"),
within = c("region", "lat"),
covariate = c("ICV_cm3"),
factorize = FALSE
)
Warning: Numerical variables NOT centered on 0 (matters if variable in interaction):
ICV_cm3
Contrasts set to contr.sum for the following variables: group.use
nice(m1)
Anova Table (Type 3 tests)
Response: value
Effect df MSE F ges p.value
1 group.use 2, 93 0.03 0.73 .007 .486
2 ICV_cm3 1, 93 0.03 38.45 *** .163 <.001
3 region 2.33, 217.00 0.01 3.88 * .016 .017
4 group.use:region 4.67, 217.00 0.01 0.39 .003 .843
5 ICV_cm3:region 2.33, 217.00 0.01 8.67 *** .036 <.001
6 lat 1, 93 0.00 0.01 <.001 .924
7 group.use:lat 2, 93 0.00 2.37 + .002 .100
8 ICV_cm3:lat 1, 93 0.00 0.01 <.001 .918
9 region:lat 2.98, 277.30 0.00 0.82 <.001 .483
10 group.use:region:lat 5.96, 277.30 0.00 2.26 * .004 .039
11 ICV_cm3:region:lat 2.98, 277.30 0.00 1.24 .001 .295
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘+’ 0.1 ‘ ’ 1
Sphericity correction method: GG
emmeans(m1, model = "multivariate", contr = "pairwise", ~ lat |
region)
$emmeans
region = CA1:
lat emmean SE df lower.CL upper.CL
right 0.884 0.01102 93 0.862 0.906
left 0.868 0.01088 93 0.847 0.890
region = CA2.CA3:
lat emmean SE df lower.CL upper.CL
right 0.205 0.00372 93 0.198 0.213
left 0.175 0.00361 93 0.168 0.182
region = CA4.DG:
lat emmean SE df lower.CL upper.CL
right 0.696 0.00900 93 0.678 0.714
left 0.669 0.00984 93 0.650 0.689
region = SR.SL.SM:
lat emmean SE df lower.CL upper.CL
right 0.525 0.00726 93 0.510 0.539
left 0.531 0.00822 93 0.514 0.547
region = Subiculum:
lat emmean SE df lower.CL upper.CL
right 0.277 0.00430 93 0.269 0.286
left 0.307 0.00518 93 0.297 0.317
Results are averaged over the levels of: group.use
Confidence level used: 0.95
$contrasts
region = CA1:
contrast estimate SE df t.ratio p.value
right - left 0.01531 0.00836 93 1.831 0.0702
region = CA2.CA3:
contrast estimate SE df t.ratio p.value
right - left 0.03002 0.00327 93 9.189 <.0001
region = CA4.DG:
contrast estimate SE df t.ratio p.value
right - left 0.02693 0.00622 93 4.332 <.0001
region = SR.SL.SM:
contrast estimate SE df t.ratio p.value
right - left -0.00606 0.00451 93 -1.343 0.1827
region = Subiculum:
contrast estimate SE df t.ratio p.value
right - left -0.02973 0.00434 93 -6.850 <.0001
Results are averaged over the levels of: group.use
emmeans(m1, model = "multivariate", contr = "pairwise", ~ lat |
region | group.use)
$emmeans
region = CA1, group.use = Highly resilient:
lat emmean SE df lower.CL upper.CL
right 0.896 0.01866 93 0.859 0.933
left 0.880 0.01843 93 0.843 0.916
region = CA2.CA3, group.use = Highly resilient:
lat emmean SE df lower.CL upper.CL
right 0.204 0.00629 93 0.191 0.216
left 0.176 0.00612 93 0.164 0.188
region = CA4.DG, group.use = Highly resilient:
lat emmean SE df lower.CL upper.CL
right 0.703 0.01524 93 0.673 0.733
left 0.683 0.01666 93 0.650 0.717
region = SR.SL.SM, group.use = Highly resilient:
lat emmean SE df lower.CL upper.CL
right 0.539 0.01228 93 0.515 0.564
left 0.541 0.01391 93 0.514 0.569
region = Subiculum, group.use = Highly resilient:
lat emmean SE df lower.CL upper.CL
right 0.277 0.00729 93 0.263 0.292
left 0.310 0.00877 93 0.293 0.328
region = CA1, group.use = Lower WTC-exposed:
lat emmean SE df lower.CL upper.CL
right 0.862 0.01948 93 0.823 0.901
left 0.870 0.01924 93 0.831 0.908
region = CA2.CA3, group.use = Lower WTC-exposed:
lat emmean SE df lower.CL upper.CL
right 0.207 0.00657 93 0.193 0.220
left 0.169 0.00639 93 0.156 0.181
region = CA4.DG, group.use = Lower WTC-exposed:
lat emmean SE df lower.CL upper.CL
right 0.681 0.01591 93 0.650 0.713
left 0.655 0.01740 93 0.621 0.690
region = SR.SL.SM, group.use = Lower WTC-exposed:
lat emmean SE df lower.CL upper.CL
right 0.501 0.01283 93 0.476 0.526
left 0.531 0.01452 93 0.502 0.560
region = Subiculum, group.use = Lower WTC-exposed:
lat emmean SE df lower.CL upper.CL
right 0.275 0.00761 93 0.260 0.290
left 0.302 0.00916 93 0.284 0.320
region = CA1, group.use = PTSD:
lat emmean SE df lower.CL upper.CL
right 0.893 0.01925 93 0.854 0.931
left 0.856 0.01901 93 0.818 0.894
region = CA2.CA3, group.use = PTSD:
lat emmean SE df lower.CL upper.CL
right 0.206 0.00649 93 0.193 0.219
left 0.182 0.00631 93 0.169 0.194
region = CA4.DG, group.use = PTSD:
lat emmean SE df lower.CL upper.CL
right 0.704 0.01572 93 0.673 0.735
left 0.669 0.01719 93 0.635 0.703
region = SR.SL.SM, group.use = PTSD:
lat emmean SE df lower.CL upper.CL
right 0.534 0.01267 93 0.509 0.559
left 0.520 0.01435 93 0.491 0.548
region = Subiculum, group.use = PTSD:
lat emmean SE df lower.CL upper.CL
right 0.280 0.00752 93 0.265 0.295
left 0.309 0.00905 93 0.291 0.326
Confidence level used: 0.95
$contrasts
region = CA1, group.use = Highly resilient:
contrast estimate SE df t.ratio p.value
right - left 0.01683 0.01415 93 1.189 0.2375
region = CA2.CA3, group.use = Highly resilient:
contrast estimate SE df t.ratio p.value
right - left 0.02802 0.00553 93 5.066 <.0001
region = CA4.DG, group.use = Highly resilient:
contrast estimate SE df t.ratio p.value
right - left 0.01972 0.01052 93 1.874 0.0641
region = SR.SL.SM, group.use = Highly resilient:
contrast estimate SE df t.ratio p.value
right - left -0.00212 0.00764 93 -0.277 0.7824
region = Subiculum, group.use = Highly resilient:
contrast estimate SE df t.ratio p.value
right - left -0.03341 0.00735 93 -4.546 <.0001
region = CA1, group.use = Lower WTC-exposed:
contrast estimate SE df t.ratio p.value
right - left -0.00766 0.01478 93 -0.518 0.6057
region = CA2.CA3, group.use = Lower WTC-exposed:
contrast estimate SE df t.ratio p.value
right - left 0.03801 0.00578 93 6.582 <.0001
region = CA4.DG, group.use = Lower WTC-exposed:
contrast estimate SE df t.ratio p.value
right - left 0.02597 0.01099 93 2.364 0.0201
region = SR.SL.SM, group.use = Lower WTC-exposed:
contrast estimate SE df t.ratio p.value
right - left -0.03013 0.00798 93 -3.776 0.0003
region = Subiculum, group.use = Lower WTC-exposed:
contrast estimate SE df t.ratio p.value
right - left -0.02691 0.00767 93 -3.508 0.0007
region = CA1, group.use = PTSD:
contrast estimate SE df t.ratio p.value
right - left 0.03676 0.01460 93 2.518 0.0135
region = CA2.CA3, group.use = PTSD:
contrast estimate SE df t.ratio p.value
right - left 0.02403 0.00571 93 4.212 0.0001
region = CA4.DG, group.use = PTSD:
contrast estimate SE df t.ratio p.value
right - left 0.03508 0.01085 93 3.232 0.0017
region = SR.SL.SM, group.use = PTSD:
contrast estimate SE df t.ratio p.value
right - left 0.01407 0.00788 93 1.784 0.0776
region = Subiculum, group.use = PTSD:
contrast estimate SE df t.ratio p.value
right - left -0.02887 0.00758 93 -3.809 0.0003
ggplot(df_long1, aes(group.use, value, fill = lat)) +
stat_summary(
geom = "col",
fun = mean,
position = "dodge",
color = "black"
) +
stat_summary(
geom = "errorbar",
fun.data = mean_se,
position = position_dodge(.9),
width = 0.25,
color = "black"
) + theme_clean() + theme(axis.text.x=element_text(angle=45, hjust=1))+ geom_hline(yintercept = 0) + facet_wrap( ~ region, scales = "free") + labs(title =
"Absolute volume (cm^3)")
For pairwise comparisons: P value threshold, corrected for multiple comparisons = .05/(5 regions x 2 hemispheres) = .005
# MODEL 2: Percent (aka normalized volume)
m1 <-
aov_car(
value ~ group.use * region * lat + Error(record_id / region / lat),
df_long2,
factorize = FALSE,
type = 3
)
Contrasts set to contr.sum for the following variables: group.use
nice(m1)
Anova Table (Type 3 tests)
Response: value
Effect df MSE F ges p.value
1 group.use 2, 94 0.00 0.48 .005 .620
2 region 2.36, 221.47 0.00 2502.41 *** .915 <.001
3 group.use:region 4.71, 221.47 0.00 0.32 .003 .890
4 lat 1, 94 0.00 5.75 * .002 .018
5 group.use:lat 2, 94 0.00 2.45 + .002 .091
6 region:lat 3.01, 283.14 0.00 22.15 *** .021 <.001
7 group.use:region:lat 6.02, 283.14 0.00 2.24 * .004 .040
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘+’ 0.1 ‘ ’ 1
Sphericity correction method: GG
emmeans(m1, ~ group.use |
region | lat, model = "multivariate", contr = "pairwise")
$emmeans
region = CA1, lat = right:
group.use emmean SE df lower.CL upper.CL
Highly resilient 0.0594 0.001239 94 0.0569 0.0618
Lower WTC-exposed 0.0575 0.001297 94 0.0549 0.0601
PTSD 0.0596 0.001277 94 0.0570 0.0621
region = CA2.CA3, lat = right:
group.use emmean SE df lower.CL upper.CL
Highly resilient 0.0135 0.000418 94 0.0127 0.0143
Lower WTC-exposed 0.0138 0.000438 94 0.0129 0.0146
PTSD 0.0137 0.000431 94 0.0129 0.0146
region = CA4.DG, lat = right:
group.use emmean SE df lower.CL upper.CL
Highly resilient 0.0466 0.001048 94 0.0445 0.0487
Lower WTC-exposed 0.0454 0.001097 94 0.0433 0.0476
PTSD 0.0471 0.001080 94 0.0449 0.0492
region = SR.SL.SM, lat = right:
group.use emmean SE df lower.CL upper.CL
Highly resilient 0.0358 0.000818 94 0.0341 0.0374
Lower WTC-exposed 0.0334 0.000857 94 0.0317 0.0351
PTSD 0.0355 0.000843 94 0.0338 0.0372
region = Subiculum, lat = right:
group.use emmean SE df lower.CL upper.CL
Highly resilient 0.0184 0.000478 94 0.0174 0.0193
Lower WTC-exposed 0.0184 0.000501 94 0.0174 0.0194
PTSD 0.0186 0.000493 94 0.0176 0.0196
region = CA1, lat = left:
group.use emmean SE df lower.CL upper.CL
Highly resilient 0.0583 0.001236 94 0.0558 0.0607
Lower WTC-exposed 0.0580 0.001294 94 0.0554 0.0606
PTSD 0.0572 0.001274 94 0.0547 0.0597
region = CA2.CA3, lat = left:
group.use emmean SE df lower.CL upper.CL
Highly resilient 0.0116 0.000397 94 0.0108 0.0124
Lower WTC-exposed 0.0113 0.000415 94 0.0104 0.0121
PTSD 0.0122 0.000409 94 0.0114 0.0130
region = CA4.DG, lat = left:
group.use emmean SE df lower.CL upper.CL
Highly resilient 0.0452 0.001140 94 0.0430 0.0475
Lower WTC-exposed 0.0438 0.001194 94 0.0415 0.0462
PTSD 0.0448 0.001175 94 0.0424 0.0471
region = SR.SL.SM, lat = left:
group.use emmean SE df lower.CL upper.CL
Highly resilient 0.0359 0.000920 94 0.0341 0.0378
Lower WTC-exposed 0.0354 0.000963 94 0.0334 0.0373
PTSD 0.0344 0.000948 94 0.0326 0.0363
region = Subiculum, lat = left:
group.use emmean SE df lower.CL upper.CL
Highly resilient 0.0206 0.000583 94 0.0195 0.0218
Lower WTC-exposed 0.0201 0.000611 94 0.0189 0.0213
PTSD 0.0205 0.000601 94 0.0193 0.0217
Confidence level used: 0.95
$contrasts
region = CA1, lat = right:
contrast estimate SE df t.ratio p.value
Highly resilient - (Lower WTC-exposed) 0.0018854 0.001794 94 1.051 0.5467
Highly resilient - PTSD -0.0001742 0.001779 94 -0.098 0.9947
(Lower WTC-exposed) - PTSD -0.0020596 0.001820 94 -1.132 0.4972
region = CA2.CA3, lat = right:
contrast estimate SE df t.ratio p.value
Highly resilient - (Lower WTC-exposed) -0.0002801 0.000605 94 -0.463 0.8888
Highly resilient - PTSD -0.0002551 0.000600 94 -0.425 0.9054
(Lower WTC-exposed) - PTSD 0.0000250 0.000614 94 0.041 0.9991
region = CA4.DG, lat = right:
contrast estimate SE df t.ratio p.value
Highly resilient - (Lower WTC-exposed) 0.0011820 0.001517 94 0.779 0.7168
Highly resilient - PTSD -0.0004455 0.001505 94 -0.296 0.9528
(Lower WTC-exposed) - PTSD -0.0016276 0.001540 94 -1.057 0.5430
region = SR.SL.SM, lat = right:
contrast estimate SE df t.ratio p.value
Highly resilient - (Lower WTC-exposed) 0.0024019 0.001184 94 2.028 0.1111
Highly resilient - PTSD 0.0002592 0.001175 94 0.221 0.9735
(Lower WTC-exposed) - PTSD -0.0021427 0.001202 94 -1.783 0.1809
region = Subiculum, lat = right:
contrast estimate SE df t.ratio p.value
Highly resilient - (Lower WTC-exposed) 0.0000123 0.000693 94 0.018 0.9998
Highly resilient - PTSD -0.0001993 0.000687 94 -0.290 0.9547
(Lower WTC-exposed) - PTSD -0.0002115 0.000703 94 -0.301 0.9513
region = CA1, lat = left:
contrast estimate SE df t.ratio p.value
Highly resilient - (Lower WTC-exposed) 0.0002591 0.001789 94 0.145 0.9885
Highly resilient - PTSD 0.0010726 0.001774 94 0.604 0.8180
(Lower WTC-exposed) - PTSD 0.0008135 0.001816 94 0.448 0.8954
region = CA2.CA3, lat = left:
contrast estimate SE df t.ratio p.value
Highly resilient - (Lower WTC-exposed) 0.0003441 0.000574 94 0.599 0.8209
Highly resilient - PTSD -0.0005655 0.000570 94 -0.993 0.5832
(Lower WTC-exposed) - PTSD -0.0009097 0.000583 94 -1.561 0.2678
region = CA4.DG, lat = left:
contrast estimate SE df t.ratio p.value
Highly resilient - (Lower WTC-exposed) 0.0013864 0.001651 94 0.840 0.6792
Highly resilient - PTSD 0.0004685 0.001637 94 0.286 0.9559
(Lower WTC-exposed) - PTSD -0.0009178 0.001675 94 -0.548 0.8478
region = SR.SL.SM, lat = left:
contrast estimate SE df t.ratio p.value
Highly resilient - (Lower WTC-exposed) 0.0005777 0.001332 94 0.434 0.9016
Highly resilient - PTSD 0.0014879 0.001321 94 1.127 0.5001
(Lower WTC-exposed) - PTSD 0.0009102 0.001351 94 0.674 0.7794
region = Subiculum, lat = left:
contrast estimate SE df t.ratio p.value
Highly resilient - (Lower WTC-exposed) 0.0005128 0.000845 94 0.607 0.8167
Highly resilient - PTSD 0.0001441 0.000838 94 0.172 0.9838
(Lower WTC-exposed) - PTSD -0.0003687 0.000857 94 -0.430 0.9032
P value adjustment: tukey method for comparing a family of 3 estimates
emmeans(m1, ~ lat |
region | group.use, model = "multivariate", contr = "pairwise")
$emmeans
region = CA1, group.use = Highly resilient:
lat emmean SE df lower.CL upper.CL
right 0.0594 0.001239 94 0.0569 0.0618
left 0.0583 0.001236 94 0.0558 0.0607
region = CA2.CA3, group.use = Highly resilient:
lat emmean SE df lower.CL upper.CL
right 0.0135 0.000418 94 0.0127 0.0143
left 0.0116 0.000397 94 0.0108 0.0124
region = CA4.DG, group.use = Highly resilient:
lat emmean SE df lower.CL upper.CL
right 0.0466 0.001048 94 0.0445 0.0487
left 0.0452 0.001140 94 0.0430 0.0475
region = SR.SL.SM, group.use = Highly resilient:
lat emmean SE df lower.CL upper.CL
right 0.0358 0.000818 94 0.0341 0.0374
left 0.0359 0.000920 94 0.0341 0.0378
region = Subiculum, group.use = Highly resilient:
lat emmean SE df lower.CL upper.CL
right 0.0184 0.000478 94 0.0174 0.0193
left 0.0206 0.000583 94 0.0195 0.0218
region = CA1, group.use = Lower WTC-exposed:
lat emmean SE df lower.CL upper.CL
right 0.0575 0.001297 94 0.0549 0.0601
left 0.0580 0.001294 94 0.0554 0.0606
region = CA2.CA3, group.use = Lower WTC-exposed:
lat emmean SE df lower.CL upper.CL
right 0.0138 0.000438 94 0.0129 0.0146
left 0.0113 0.000415 94 0.0104 0.0121
region = CA4.DG, group.use = Lower WTC-exposed:
lat emmean SE df lower.CL upper.CL
right 0.0454 0.001097 94 0.0433 0.0476
left 0.0438 0.001194 94 0.0415 0.0462
region = SR.SL.SM, group.use = Lower WTC-exposed:
lat emmean SE df lower.CL upper.CL
right 0.0334 0.000857 94 0.0317 0.0351
left 0.0354 0.000963 94 0.0334 0.0373
region = Subiculum, group.use = Lower WTC-exposed:
lat emmean SE df lower.CL upper.CL
right 0.0184 0.000501 94 0.0174 0.0194
left 0.0201 0.000611 94 0.0189 0.0213
region = CA1, group.use = PTSD:
lat emmean SE df lower.CL upper.CL
right 0.0596 0.001277 94 0.0570 0.0621
left 0.0572 0.001274 94 0.0547 0.0597
region = CA2.CA3, group.use = PTSD:
lat emmean SE df lower.CL upper.CL
right 0.0137 0.000431 94 0.0129 0.0146
left 0.0122 0.000409 94 0.0114 0.0130
region = CA4.DG, group.use = PTSD:
lat emmean SE df lower.CL upper.CL
right 0.0471 0.001080 94 0.0449 0.0492
left 0.0448 0.001175 94 0.0424 0.0471
region = SR.SL.SM, group.use = PTSD:
lat emmean SE df lower.CL upper.CL
right 0.0355 0.000843 94 0.0338 0.0372
left 0.0344 0.000948 94 0.0326 0.0363
region = Subiculum, group.use = PTSD:
lat emmean SE df lower.CL upper.CL
right 0.0186 0.000493 94 0.0176 0.0196
left 0.0205 0.000601 94 0.0193 0.0217
Confidence level used: 0.95
$contrasts
region = CA1, group.use = Highly resilient:
contrast estimate SE df t.ratio p.value
right - left 0.001115 0.000931 94 1.198 0.2340
region = CA2.CA3, group.use = Highly resilient:
contrast estimate SE df t.ratio p.value
right - left 0.001898 0.000363 94 5.230 <.0001
region = CA4.DG, group.use = Highly resilient:
contrast estimate SE df t.ratio p.value
right - left 0.001404 0.000705 94 1.992 0.0493
region = SR.SL.SM, group.use = Highly resilient:
contrast estimate SE df t.ratio p.value
right - left -0.000161 0.000513 94 -0.315 0.7538
region = Subiculum, group.use = Highly resilient:
contrast estimate SE df t.ratio p.value
right - left -0.002243 0.000490 94 -4.577 <.0001
region = CA1, group.use = Lower WTC-exposed:
contrast estimate SE df t.ratio p.value
right - left -0.000511 0.000975 94 -0.524 0.6013
region = CA2.CA3, group.use = Lower WTC-exposed:
contrast estimate SE df t.ratio p.value
right - left 0.002522 0.000380 94 6.637 <.0001
region = CA4.DG, group.use = Lower WTC-exposed:
contrast estimate SE df t.ratio p.value
right - left 0.001608 0.000738 94 2.179 0.0318
region = SR.SL.SM, group.use = Lower WTC-exposed:
contrast estimate SE df t.ratio p.value
right - left -0.001985 0.000537 94 -3.697 0.0004
region = Subiculum, group.use = Lower WTC-exposed:
contrast estimate SE df t.ratio p.value
right - left -0.001743 0.000513 94 -3.395 0.0010
region = CA1, group.use = PTSD:
contrast estimate SE df t.ratio p.value
right - left 0.002362 0.000960 94 2.461 0.0157
region = CA2.CA3, group.use = PTSD:
contrast estimate SE df t.ratio p.value
right - left 0.001587 0.000374 94 4.244 0.0001
region = CA4.DG, group.use = PTSD:
contrast estimate SE df t.ratio p.value
right - left 0.002318 0.000726 94 3.191 0.0019
region = SR.SL.SM, group.use = PTSD:
contrast estimate SE df t.ratio p.value
right - left 0.001067 0.000529 94 2.019 0.0463
region = Subiculum, group.use = PTSD:
contrast estimate SE df t.ratio p.value
right - left -0.001900 0.000505 94 -3.761 0.0003
emmeans(m1, ~ lat |
group.use, model = "multivariate", contr = "pairwise")
$emmeans
group.use = Highly resilient:
lat emmean SE df lower.CL upper.CL
right 0.0347 0.000616 94 0.0335 0.0360
left 0.0343 0.000649 94 0.0330 0.0356
group.use = Lower WTC-exposed:
lat emmean SE df lower.CL upper.CL
right 0.0337 0.000645 94 0.0324 0.0350
left 0.0337 0.000680 94 0.0324 0.0351
group.use = PTSD:
lat emmean SE df lower.CL upper.CL
right 0.0349 0.000635 94 0.0336 0.0362
left 0.0338 0.000669 94 0.0325 0.0351
Results are averaged over the levels of: region
Confidence level used: 0.95
$contrasts
group.use = Highly resilient:
contrast estimate SE df t.ratio p.value
right - left 0.0004024 0.000344 94 1.168 0.2456
group.use = Lower WTC-exposed:
contrast estimate SE df t.ratio p.value
right - left -0.0000219 0.000361 94 -0.061 0.9518
group.use = PTSD:
contrast estimate SE df t.ratio p.value
right - left 0.0010869 0.000355 94 3.062 0.0029
Results are averaged over the levels of: region
ggplot(df_long2, aes(group.use, value, fill = lat)) +
stat_summary(
geom = "col",
fun = mean,
position = "dodge",
color = "black"
) +
stat_summary(
geom = "errorbar",
fun.data = mean_se,
position = position_dodge(.9),
width = 0.25,
color = "black"
) + theme_clean() + theme(axis.text.x=element_text(angle=45, hjust=1))+ geom_hline(yintercept = 0) + facet_wrap( ~ region, scales = "free") + labs(title =
"Normalized volume (%)")
For pairwise comparisons: P value threshold, corrected for multiple comparisons = .05/(5 regions) = .01
# MODEL 3: Asymmetry index
m1 <-
aov_car(
value ~ group.use * region + Error(record_id / region),
df_long3,
factorize = TRUE,
type = 3
)
Contrasts set to contr.sum for the following variables: group.use
nice(m1)
Anova Table (Type 3 tests)
Response: value
Effect df MSE F ges p.value
1 group.use 2, 94 217.89 0.66 .004 .520
2 region 2.55, 239.69 224.64 59.69 *** .315 <.001
3 group.use:region 5.10, 239.69 224.64 2.29 * .034 .046
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘+’ 0.1 ‘ ’ 1
Sphericity correction method: GG
emmeans(m1, ~ group.use |
region, model = "multivariate", contr = "pairwise")
$emmeans
region = CA1:
group.use emmean SE df lower.CL upper.CL
Highly resilient 1.777 1.71 94 -1.6191 5.17
Lower WTC-exposed -0.938 1.79 94 -4.4940 2.62
PTSD 4.362 1.76 94 0.8618 7.86
region = CA2.CA3:
group.use emmean SE df lower.CL upper.CL
Highly resilient 15.413 3.10 94 9.2521 21.57
Lower WTC-exposed 20.357 3.25 94 13.9044 26.81
PTSD 12.758 3.20 94 6.4071 19.11
region = CA4.DG:
group.use emmean SE df lower.CL upper.CL
Highly resilient 3.327 1.64 94 0.0613 6.59
Lower WTC-exposed 3.779 1.72 94 0.3589 7.20
PTSD 5.340 1.70 94 1.9742 8.71
region = SR.SL.SM:
group.use emmean SE df lower.CL upper.CL
Highly resilient -0.384 1.55 94 -3.4610 2.69
Lower WTC-exposed -5.554 1.62 94 -8.7770 -2.33
PTSD 3.549 1.60 94 0.3769 6.72
region = Subiculum:
group.use emmean SE df lower.CL upper.CL
Highly resilient -11.543 2.37 94 -16.2396 -6.85
Lower WTC-exposed -8.816 2.48 94 -13.7343 -3.90
PTSD -9.133 2.44 94 -13.9737 -4.29
Confidence level used: 0.95
$contrasts
region = CA1:
contrast estimate SE df t.ratio p.value
Highly resilient - (Lower WTC-exposed) 2.714 2.48 94 1.096 0.5189
Highly resilient - PTSD -2.585 2.46 94 -1.053 0.5458
(Lower WTC-exposed) - PTSD -5.300 2.51 94 -2.109 0.0935
region = CA2.CA3:
contrast estimate SE df t.ratio p.value
Highly resilient - (Lower WTC-exposed) -4.944 4.49 94 -1.100 0.5163
Highly resilient - PTSD 2.655 4.46 94 0.596 0.8227
(Lower WTC-exposed) - PTSD 7.599 4.56 94 1.666 0.2235
region = CA4.DG:
contrast estimate SE df t.ratio p.value
Highly resilient - (Lower WTC-exposed) -0.452 2.38 94 -0.190 0.9803
Highly resilient - PTSD -2.013 2.36 94 -0.852 0.6714
(Lower WTC-exposed) - PTSD -1.562 2.42 94 -0.646 0.7950
region = SR.SL.SM:
contrast estimate SE df t.ratio p.value
Highly resilient - (Lower WTC-exposed) 5.171 2.24 94 2.304 0.0601
Highly resilient - PTSD -3.933 2.23 94 -1.767 0.1864
(Lower WTC-exposed) - PTSD -9.103 2.28 94 -3.997 0.0004
region = Subiculum:
contrast estimate SE df t.ratio p.value
Highly resilient - (Lower WTC-exposed) -2.727 3.42 94 -0.796 0.7062
Highly resilient - PTSD -2.410 3.40 94 -0.710 0.7584
(Lower WTC-exposed) - PTSD 0.317 3.48 94 0.091 0.9954
P value adjustment: tukey method for comparing a family of 3 estimates
emmeans(m1, ~ group.use, model = "multivariate", contr = "pairwise")
$emmeans
group.use emmean SE df lower.CL upper.CL
Highly resilient 1.72 1.13 94 -0.530 3.97
Lower WTC-exposed 1.77 1.19 94 -0.589 4.12
PTSD 3.38 1.17 94 1.058 5.69
Results are averaged over the levels of: region
Confidence level used: 0.95
$contrasts
contrast estimate SE df t.ratio p.value
Highly resilient - (Lower WTC-exposed) -0.0476 1.64 94 -0.029 0.9995
Highly resilient - PTSD -1.6573 1.63 94 -1.019 0.5666
(Lower WTC-exposed) - PTSD -1.6097 1.66 94 -0.968 0.5991
Results are averaged over the levels of: region
P value adjustment: tukey method for comparing a family of 3 estimates
ggplot(df_long3, aes(group.use, value, fill = region)) +
stat_summary(
geom = "col",
fun = mean,
position = "dodge",
color = "black"
) +
stat_summary(
geom = "errorbar",
fun.data = mean_se,
position = position_dodge(.9),
width = 0.25,
color = "black"
) + theme_clean() + theme(axis.text.x=element_text(angle=45, hjust=1))+ geom_hline(yintercept = 0) + facet_wrap( ~ lat * region, scales = "fixed") + labs(title =
"Asymmetry index")
below_50_df <-
readRDS(
"/Users/sarenseeley/Dropbox/Postdoc/mentoring/Isabella Fonseca/SNT/isabella_r_scripts/below_50_df.rds"
) %>% rename(record_id = sub_id)
drop_ids <-
c(below_50_df$record_id, "NWTC-034") #excludes NWTC-034 [lots of missing trials]
# long dataset
df_long <-
df %>% select(
record_id,
group.use,
Sex,
Age,
tot_ctq,
tot_tleq_nonW,
exposures_count,
ptsd,
(contains("_pc") |
contains("_Asym") |
contains("_cm3")) &
!contains("scid")
) %>% filter(!record_id %in% drop_ids) #scid pcp shouldn't be included
df_long <- df_long %>%
tidyr::pivot_longer(
cols = -c(
record_id,
group.use,
Sex,
Age,
tot_ctq,
tot_tleq_nonW,
exposures_count,
ptsd,
ICV_cm3
),
names_to = "region",
values_to = "value"
)
df_long[12:14] <-
str_split_fixed(df_long$region, "_", 3) # split column into 3 columns, by underscore
df_long <-
df_long %>% select(!region) %>% rename(region = V1,
lat = V2,
measure = V3) # which subfield, which hemisphere, which metric (cm3, percent, asymmetry index)
df_long1 <-
df_long %>% filter(!measure == "" &
!lat == "total" &
measure == "cm3" &
!region == "Hippocampus") # don't include total hippocampus
df_long2 <-
df_long %>% filter(!measure == "" &
!lat == "total" &
measure == "pc" & !region == "Hippocampus") %>% group_by(region) %>%
mutate(z_value = scale(value))
df_long3 <-
df_long %>% filter(lat == "asymmetry" & !region == "Hippocampus")
# MODEL 1: Volume in cm^3 controlling for total ICV
m1 <-
aov_ez(
id = "record_id",
dv = "value",
df_long1,
between = c("group.use"),
within = c("region", "lat"),
covariate = c("ICV_cm3"),
factorize = FALSE
)
Warning: Numerical variables NOT centered on 0 (matters if variable in interaction):
ICV_cm3
Contrasts set to contr.sum for the following variables: group.use
nice(m1)
Anova Table (Type 3 tests)
Response: value
Effect df MSE F ges p.value
1 group.use 2, 88 0.03 0.97 .010 .383
2 ICV_cm3 1, 88 0.03 33.82 *** .149 <.001
3 region 2.40, 210.79 0.01 3.25 * .015 .032
4 group.use:region 4.79, 210.79 0.01 0.49 .004 .780
5 ICV_cm3:region 2.40, 210.79 0.01 8.54 *** .038 <.001
6 lat 1, 88 0.00 0.00 <.001 .993
7 group.use:lat 2, 88 0.00 1.92 .002 .153
8 ICV_cm3:lat 1, 88 0.00 0.03 <.001 .873
9 region:lat 2.93, 257.80 0.00 0.83 <.001 .478
10 group.use:region:lat 5.86, 257.80 0.00 2.05 + .004 .061
11 ICV_cm3:region:lat 2.93, 257.80 0.00 1.32 .001 .268
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘+’ 0.1 ‘ ’ 1
Sphericity correction method: GG
emmeans(m1, model = "multivariate", contr = "pairwise", ~ lat |
region)
$emmeans
region = CA1:
lat emmean SE df lower.CL upper.CL
right 0.888 0.01107 88 0.866 0.910
left 0.872 0.01113 88 0.850 0.894
region = CA2.CA3:
lat emmean SE df lower.CL upper.CL
right 0.207 0.00379 88 0.199 0.214
left 0.177 0.00364 88 0.169 0.184
region = CA4.DG:
lat emmean SE df lower.CL upper.CL
right 0.699 0.00879 88 0.682 0.717
left 0.673 0.00986 88 0.653 0.692
region = SR.SL.SM:
lat emmean SE df lower.CL upper.CL
right 0.525 0.00741 88 0.511 0.540
left 0.534 0.00833 88 0.517 0.550
region = Subiculum:
lat emmean SE df lower.CL upper.CL
right 0.277 0.00441 88 0.269 0.286
left 0.308 0.00536 88 0.297 0.318
Results are averaged over the levels of: group.use
Confidence level used: 0.95
$contrasts
region = CA1:
contrast estimate SE df t.ratio p.value
right - left 0.01553 0.00872 88 1.782 0.0782
region = CA2.CA3:
contrast estimate SE df t.ratio p.value
right - left 0.03036 0.00338 88 8.975 <.0001
region = CA4.DG:
contrast estimate SE df t.ratio p.value
right - left 0.02632 0.00646 88 4.077 0.0001
region = SR.SL.SM:
contrast estimate SE df t.ratio p.value
right - left -0.00834 0.00450 88 -1.852 0.0674
region = Subiculum:
contrast estimate SE df t.ratio p.value
right - left -0.03019 0.00457 88 -6.606 <.0001
Results are averaged over the levels of: group.use
emmeans(m1, model = "multivariate", contr = "pairwise", ~ lat |
region | group.use)
$emmeans
region = CA1, group.use = Highly resilient:
lat emmean SE df lower.CL upper.CL
right 0.902 0.01909 88 0.864 0.940
left 0.886 0.01919 88 0.848 0.924
region = CA2.CA3, group.use = Highly resilient:
lat emmean SE df lower.CL upper.CL
right 0.205 0.00653 88 0.192 0.218
left 0.177 0.00628 88 0.164 0.189
region = CA4.DG, group.use = Highly resilient:
lat emmean SE df lower.CL upper.CL
right 0.709 0.01516 88 0.679 0.739
left 0.689 0.01700 88 0.655 0.722
region = SR.SL.SM, group.use = Highly resilient:
lat emmean SE df lower.CL upper.CL
right 0.539 0.01279 88 0.513 0.564
left 0.544 0.01437 88 0.516 0.573
region = Subiculum, group.use = Highly resilient:
lat emmean SE df lower.CL upper.CL
right 0.276 0.00761 88 0.261 0.291
left 0.310 0.00925 88 0.292 0.329
region = CA1, group.use = Lower WTC-exposed:
lat emmean SE df lower.CL upper.CL
right 0.863 0.01907 88 0.825 0.901
left 0.871 0.01916 88 0.833 0.909
region = CA2.CA3, group.use = Lower WTC-exposed:
lat emmean SE df lower.CL upper.CL
right 0.207 0.00652 88 0.194 0.220
left 0.169 0.00627 88 0.156 0.181
region = CA4.DG, group.use = Lower WTC-exposed:
lat emmean SE df lower.CL upper.CL
right 0.682 0.01515 88 0.652 0.712
left 0.656 0.01698 88 0.622 0.690
region = SR.SL.SM, group.use = Lower WTC-exposed:
lat emmean SE df lower.CL upper.CL
right 0.502 0.01277 88 0.477 0.527
left 0.532 0.01436 88 0.504 0.561
region = Subiculum, group.use = Lower WTC-exposed:
lat emmean SE df lower.CL upper.CL
right 0.276 0.00760 88 0.260 0.291
left 0.303 0.00924 88 0.284 0.321
region = CA1, group.use = PTSD:
lat emmean SE df lower.CL upper.CL
right 0.898 0.01940 88 0.859 0.936
left 0.860 0.01950 88 0.821 0.899
region = CA2.CA3, group.use = PTSD:
lat emmean SE df lower.CL upper.CL
right 0.209 0.00664 88 0.195 0.222
left 0.184 0.00638 88 0.172 0.197
region = CA4.DG, group.use = PTSD:
lat emmean SE df lower.CL upper.CL
right 0.706 0.01541 88 0.675 0.736
left 0.673 0.01728 88 0.639 0.708
region = SR.SL.SM, group.use = PTSD:
lat emmean SE df lower.CL upper.CL
right 0.535 0.01299 88 0.510 0.561
left 0.525 0.01461 88 0.496 0.554
region = Subiculum, group.use = PTSD:
lat emmean SE df lower.CL upper.CL
right 0.280 0.00773 88 0.265 0.296
left 0.310 0.00940 88 0.291 0.328
Confidence level used: 0.95
$contrasts
region = CA1, group.use = Highly resilient:
contrast estimate SE df t.ratio p.value
right - left 0.01651 0.01503 88 1.098 0.2751
region = CA2.CA3, group.use = Highly resilient:
contrast estimate SE df t.ratio p.value
right - left 0.02862 0.00583 88 4.906 <.0001
region = CA4.DG, group.use = Highly resilient:
contrast estimate SE df t.ratio p.value
right - left 0.02054 0.01113 88 1.845 0.0684
region = SR.SL.SM, group.use = Highly resilient:
contrast estimate SE df t.ratio p.value
right - left -0.00542 0.00776 88 -0.698 0.4870
region = Subiculum, group.use = Highly resilient:
contrast estimate SE df t.ratio p.value
right - left -0.03417 0.00788 88 -4.335 <.0001
region = CA1, group.use = Lower WTC-exposed:
contrast estimate SE df t.ratio p.value
right - left -0.00749 0.01501 88 -0.499 0.6193
region = CA2.CA3, group.use = Lower WTC-exposed:
contrast estimate SE df t.ratio p.value
right - left 0.03803 0.00583 88 6.526 <.0001
region = CA4.DG, group.use = Lower WTC-exposed:
contrast estimate SE df t.ratio p.value
right - left 0.02611 0.01112 88 2.347 0.0212
region = SR.SL.SM, group.use = Lower WTC-exposed:
contrast estimate SE df t.ratio p.value
right - left -0.03031 0.00775 88 -3.909 0.0002
region = Subiculum, group.use = Lower WTC-exposed:
contrast estimate SE df t.ratio p.value
right - left -0.02700 0.00787 88 -3.430 0.0009
region = CA1, group.use = PTSD:
contrast estimate SE df t.ratio p.value
right - left 0.03757 0.01527 88 2.459 0.0159
region = CA2.CA3, group.use = PTSD:
contrast estimate SE df t.ratio p.value
right - left 0.02444 0.00593 88 4.122 0.0001
region = CA4.DG, group.use = PTSD:
contrast estimate SE df t.ratio p.value
right - left 0.03232 0.01132 88 2.857 0.0053
region = SR.SL.SM, group.use = PTSD:
contrast estimate SE df t.ratio p.value
right - left 0.01071 0.00789 88 1.358 0.1779
region = Subiculum, group.use = PTSD:
contrast estimate SE df t.ratio p.value
right - left -0.02941 0.00801 88 -3.672 0.0004
ggplot(df_long1, aes(group.use, value, fill = lat)) +
stat_summary(
geom = "col",
fun = mean,
position = "dodge",
color = "black"
) +
stat_summary(
geom = "errorbar",
fun.data = mean_se,
position = position_dodge(.9),
width = 0.25,
color = "black"
) + theme_clean() + theme(axis.text.x=element_text(angle=45, hjust=1))+ geom_hline(yintercept = 0) + facet_wrap( ~ region, scales = "free") + labs(title =
"Absolute volume (cm^3)")
# MODEL 2: Percent (aka normalized volume)
m1 <-
aov_car(
value ~ group.use * region * lat + Error(record_id / region / lat),
df_long2,
factorize = FALSE,
type = 3
)
Contrasts set to contr.sum for the following variables: group.use
nice(m1)
Anova Table (Type 3 tests)
Response: value
Effect df MSE F ges p.value
1 group.use 2, 89 0.00 0.68 .007 .509
2 region 2.44, 217.06 0.00 2454.13 *** .919 <.001
3 group.use:region 4.88, 217.06 0.00 0.37 .003 .861
4 lat 1, 89 0.00 4.39 * .002 .039
5 group.use:lat 2, 89 0.00 1.90 .002 .156
6 region:lat 2.96, 263.80 0.00 21.44 *** .022 <.001
7 group.use:region:lat 5.93, 263.80 0.00 2.04 + .004 .062
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘+’ 0.1 ‘ ’ 1
Sphericity correction method: GG
emmeans(m1, ~ group.use |
region | lat, model = "multivariate", contr = "pairwise")
$emmeans
region = CA1, lat = right:
group.use emmean SE df lower.CL upper.CL
Highly resilient 0.0597 0.001266 89 0.0572 0.0622
Lower WTC-exposed 0.0575 0.001266 89 0.0550 0.0600
PTSD 0.0597 0.001287 89 0.0572 0.0623
region = CA2.CA3, lat = right:
group.use emmean SE df lower.CL upper.CL
Highly resilient 0.0136 0.000436 89 0.0127 0.0145
Lower WTC-exposed 0.0138 0.000436 89 0.0129 0.0146
PTSD 0.0139 0.000444 89 0.0130 0.0148
region = CA4.DG, lat = right:
group.use emmean SE df lower.CL upper.CL
Highly resilient 0.0470 0.001022 89 0.0450 0.0490
Lower WTC-exposed 0.0454 0.001022 89 0.0434 0.0475
PTSD 0.0469 0.001039 89 0.0449 0.0490
region = SR.SL.SM, lat = right:
group.use emmean SE df lower.CL upper.CL
Highly resilient 0.0357 0.000852 89 0.0340 0.0374
Lower WTC-exposed 0.0334 0.000852 89 0.0317 0.0351
PTSD 0.0355 0.000866 89 0.0338 0.0372
region = Subiculum, lat = right:
group.use emmean SE df lower.CL upper.CL
Highly resilient 0.0183 0.000504 89 0.0173 0.0193
Lower WTC-exposed 0.0184 0.000504 89 0.0174 0.0194
PTSD 0.0186 0.000512 89 0.0176 0.0196
region = CA1, lat = left:
group.use emmean SE df lower.CL upper.CL
Highly resilient 0.0586 0.001280 89 0.0561 0.0612
Lower WTC-exposed 0.0580 0.001280 89 0.0555 0.0606
PTSD 0.0572 0.001301 89 0.0547 0.0598
region = CA2.CA3, lat = left:
group.use emmean SE df lower.CL upper.CL
Highly resilient 0.0116 0.000412 89 0.0108 0.0125
Lower WTC-exposed 0.0113 0.000412 89 0.0104 0.0121
PTSD 0.0123 0.000418 89 0.0115 0.0132
region = CA4.DG, lat = left:
group.use emmean SE df lower.CL upper.CL
Highly resilient 0.0455 0.001160 89 0.0432 0.0478
Lower WTC-exposed 0.0438 0.001160 89 0.0415 0.0461
PTSD 0.0448 0.001179 89 0.0425 0.0472
region = SR.SL.SM, lat = left:
group.use emmean SE df lower.CL upper.CL
Highly resilient 0.0360 0.000943 89 0.0342 0.0379
Lower WTC-exposed 0.0354 0.000943 89 0.0335 0.0372
PTSD 0.0347 0.000958 89 0.0328 0.0367
region = Subiculum, lat = left:
group.use emmean SE df lower.CL upper.CL
Highly resilient 0.0206 0.000618 89 0.0194 0.0218
Lower WTC-exposed 0.0201 0.000618 89 0.0189 0.0213
PTSD 0.0205 0.000628 89 0.0193 0.0218
Confidence level used: 0.95
$contrasts
region = CA1, lat = right:
contrast estimate SE df t.ratio p.value
Highly resilient - (Lower WTC-exposed) 0.00219900 0.001791 89 1.228 0.4399
Highly resilient - PTSD -0.00000793 0.001805 89 -0.004 1.0000
(Lower WTC-exposed) - PTSD -0.00220693 0.001805 89 -1.222 0.4432
region = CA2.CA3, lat = right:
contrast estimate SE df t.ratio p.value
Highly resilient - (Lower WTC-exposed) -0.00018866 0.000617 89 -0.306 0.9498
Highly resilient - PTSD -0.00033408 0.000622 89 -0.537 0.8534
(Lower WTC-exposed) - PTSD -0.00014542 0.000622 89 -0.234 0.9703
region = CA4.DG, lat = right:
contrast estimate SE df t.ratio p.value
Highly resilient - (Lower WTC-exposed) 0.00154697 0.001445 89 1.070 0.5349
Highly resilient - PTSD 0.00007029 0.001457 89 0.048 0.9987
(Lower WTC-exposed) - PTSD -0.00147668 0.001457 89 -1.013 0.5705
region = SR.SL.SM, lat = right:
contrast estimate SE df t.ratio p.value
Highly resilient - (Lower WTC-exposed) 0.00232723 0.001205 89 1.932 0.1357
Highly resilient - PTSD 0.00018283 0.001215 89 0.151 0.9876
(Lower WTC-exposed) - PTSD -0.00214440 0.001215 89 -1.766 0.1871
region = Subiculum, lat = right:
contrast estimate SE df t.ratio p.value
Highly resilient - (Lower WTC-exposed) -0.00006371 0.000712 89 -0.089 0.9956
Highly resilient - PTSD -0.00028684 0.000718 89 -0.400 0.9159
(Lower WTC-exposed) - PTSD -0.00022313 0.000718 89 -0.311 0.9482
region = CA1, lat = left:
contrast estimate SE df t.ratio p.value
Highly resilient - (Lower WTC-exposed) 0.00061497 0.001810 89 0.340 0.9384
Highly resilient - PTSD 0.00137730 0.001825 89 0.755 0.7315
(Lower WTC-exposed) - PTSD 0.00076233 0.001825 89 0.418 0.9084
region = CA2.CA3, lat = left:
contrast estimate SE df t.ratio p.value
Highly resilient - (Lower WTC-exposed) 0.00039314 0.000582 89 0.675 0.7783
Highly resilient - PTSD -0.00067465 0.000587 89 -1.150 0.4864
(Lower WTC-exposed) - PTSD -0.00106778 0.000587 89 -1.820 0.1691
region = CA4.DG, lat = left:
contrast estimate SE df t.ratio p.value
Highly resilient - (Lower WTC-exposed) 0.00169910 0.001640 89 1.036 0.5563
Highly resilient - PTSD 0.00069449 0.001654 89 0.420 0.9075
(Lower WTC-exposed) - PTSD -0.00100461 0.001654 89 -0.607 0.8164
region = SR.SL.SM, lat = left:
contrast estimate SE df t.ratio p.value
Highly resilient - (Lower WTC-exposed) 0.00066997 0.001333 89 0.503 0.8702
Highly resilient - PTSD 0.00127682 0.001344 89 0.950 0.6103
(Lower WTC-exposed) - PTSD 0.00060685 0.001344 89 0.452 0.8939
region = Subiculum, lat = left:
contrast estimate SE df t.ratio p.value
Highly resilient - (Lower WTC-exposed) 0.00047742 0.000874 89 0.546 0.8486
Highly resilient - PTSD 0.00005249 0.000881 89 0.060 0.9980
(Lower WTC-exposed) - PTSD -0.00042493 0.000881 89 -0.482 0.8799
P value adjustment: tukey method for comparing a family of 3 estimates
emmeans(m1, ~ lat |
region | group.use, model = "multivariate", contr = "pairwise")
$emmeans
region = CA1, group.use = Highly resilient:
lat emmean SE df lower.CL upper.CL
right 0.0597 0.001266 89 0.0572 0.0622
left 0.0586 0.001280 89 0.0561 0.0612
region = CA2.CA3, group.use = Highly resilient:
lat emmean SE df lower.CL upper.CL
right 0.0136 0.000436 89 0.0127 0.0145
left 0.0116 0.000412 89 0.0108 0.0125
region = CA4.DG, group.use = Highly resilient:
lat emmean SE df lower.CL upper.CL
right 0.0470 0.001022 89 0.0450 0.0490
left 0.0455 0.001160 89 0.0432 0.0478
region = SR.SL.SM, group.use = Highly resilient:
lat emmean SE df lower.CL upper.CL
right 0.0357 0.000852 89 0.0340 0.0374
left 0.0360 0.000943 89 0.0342 0.0379
region = Subiculum, group.use = Highly resilient:
lat emmean SE df lower.CL upper.CL
right 0.0183 0.000504 89 0.0173 0.0193
left 0.0206 0.000618 89 0.0194 0.0218
region = CA1, group.use = Lower WTC-exposed:
lat emmean SE df lower.CL upper.CL
right 0.0575 0.001266 89 0.0550 0.0600
left 0.0580 0.001280 89 0.0555 0.0606
region = CA2.CA3, group.use = Lower WTC-exposed:
lat emmean SE df lower.CL upper.CL
right 0.0138 0.000436 89 0.0129 0.0146
left 0.0113 0.000412 89 0.0104 0.0121
region = CA4.DG, group.use = Lower WTC-exposed:
lat emmean SE df lower.CL upper.CL
right 0.0454 0.001022 89 0.0434 0.0475
left 0.0438 0.001160 89 0.0415 0.0461
region = SR.SL.SM, group.use = Lower WTC-exposed:
lat emmean SE df lower.CL upper.CL
right 0.0334 0.000852 89 0.0317 0.0351
left 0.0354 0.000943 89 0.0335 0.0372
region = Subiculum, group.use = Lower WTC-exposed:
lat emmean SE df lower.CL upper.CL
right 0.0184 0.000504 89 0.0174 0.0194
left 0.0201 0.000618 89 0.0189 0.0213
region = CA1, group.use = PTSD:
lat emmean SE df lower.CL upper.CL
right 0.0597 0.001287 89 0.0572 0.0623
left 0.0572 0.001301 89 0.0547 0.0598
region = CA2.CA3, group.use = PTSD:
lat emmean SE df lower.CL upper.CL
right 0.0139 0.000444 89 0.0130 0.0148
left 0.0123 0.000418 89 0.0115 0.0132
region = CA4.DG, group.use = PTSD:
lat emmean SE df lower.CL upper.CL
right 0.0469 0.001039 89 0.0449 0.0490
left 0.0448 0.001179 89 0.0425 0.0472
region = SR.SL.SM, group.use = PTSD:
lat emmean SE df lower.CL upper.CL
right 0.0355 0.000866 89 0.0338 0.0372
left 0.0347 0.000958 89 0.0328 0.0367
region = Subiculum, group.use = PTSD:
lat emmean SE df lower.CL upper.CL
right 0.0186 0.000512 89 0.0176 0.0196
left 0.0205 0.000628 89 0.0193 0.0218
Confidence level used: 0.95
$contrasts
region = CA1, group.use = Highly resilient:
contrast estimate SE df t.ratio p.value
right - left 0.001073 0.000990 89 1.084 0.2815
region = CA2.CA3, group.use = Highly resilient:
contrast estimate SE df t.ratio p.value
right - left 0.001940 0.000383 89 5.064 <.0001
region = CA4.DG, group.use = Highly resilient:
contrast estimate SE df t.ratio p.value
right - left 0.001456 0.000746 89 1.951 0.0542
region = SR.SL.SM, group.use = Highly resilient:
contrast estimate SE df t.ratio p.value
right - left -0.000328 0.000522 89 -0.629 0.5313
region = Subiculum, group.use = Highly resilient:
contrast estimate SE df t.ratio p.value
right - left -0.002284 0.000527 89 -4.338 <.0001
region = CA1, group.use = Lower WTC-exposed:
contrast estimate SE df t.ratio p.value
right - left -0.000511 0.000990 89 -0.516 0.6069
region = CA2.CA3, group.use = Lower WTC-exposed:
contrast estimate SE df t.ratio p.value
right - left 0.002522 0.000383 89 6.582 <.0001
region = CA4.DG, group.use = Lower WTC-exposed:
contrast estimate SE df t.ratio p.value
right - left 0.001608 0.000746 89 2.155 0.0339
region = SR.SL.SM, group.use = Lower WTC-exposed:
contrast estimate SE df t.ratio p.value
right - left -0.001985 0.000522 89 -3.802 0.0003
region = Subiculum, group.use = Lower WTC-exposed:
contrast estimate SE df t.ratio p.value
right - left -0.001743 0.000527 89 -3.310 0.0013
region = CA1, group.use = PTSD:
contrast estimate SE df t.ratio p.value
right - left 0.002458 0.001007 89 2.442 0.0166
region = CA2.CA3, group.use = PTSD:
contrast estimate SE df t.ratio p.value
right - left 0.001600 0.000390 89 4.107 0.0001
region = CA4.DG, group.use = PTSD:
contrast estimate SE df t.ratio p.value
right - left 0.002080 0.000759 89 2.742 0.0074
region = SR.SL.SM, group.use = PTSD:
contrast estimate SE df t.ratio p.value
right - left 0.000766 0.000531 89 1.443 0.1527
region = Subiculum, group.use = PTSD:
contrast estimate SE df t.ratio p.value
right - left -0.001945 0.000535 89 -3.633 0.0005
emmeans(m1, ~ lat |
group.use, model = "multivariate", contr = "pairwise")
$emmeans
group.use = Highly resilient:
lat emmean SE df lower.CL upper.CL
right 0.0349 0.000619 89 0.0336 0.0361
left 0.0345 0.000658 89 0.0332 0.0358
group.use = Lower WTC-exposed:
lat emmean SE df lower.CL upper.CL
right 0.0337 0.000619 89 0.0325 0.0349
left 0.0337 0.000658 89 0.0324 0.0350
group.use = PTSD:
lat emmean SE df lower.CL upper.CL
right 0.0349 0.000629 89 0.0337 0.0362
left 0.0339 0.000669 89 0.0326 0.0353
Results are averaged over the levels of: region
Confidence level used: 0.95
$contrasts
group.use = Highly resilient:
contrast estimate SE df t.ratio p.value
right - left 0.0003714 0.000368 89 1.011 0.3150
group.use = Lower WTC-exposed:
contrast estimate SE df t.ratio p.value
right - left -0.0000219 0.000368 89 -0.060 0.9527
group.use = PTSD:
contrast estimate SE df t.ratio p.value
right - left 0.0009918 0.000374 89 2.655 0.0094
Results are averaged over the levels of: region
ggplot(df_long2, aes(group.use, value, fill = lat)) +
stat_summary(
geom = "col",
fun = mean,
position = "dodge",
color = "black"
) +
stat_summary(
geom = "errorbar",
fun.data = mean_se,
position = position_dodge(.9),
width = 0.25,
color = "black"
) + theme_clean() + theme(axis.text.x=element_text(angle=45, hjust=1)) + geom_hline(yintercept = 0) + facet_wrap( ~ region, scales = "free") + labs(title =
"Normalized volume (%)")
# MODEL 3: Asymmetry index
m1 <-
aov_car(
value ~ group.use * region + Error(record_id / region),
df_long3,
factorize = TRUE,
type = 3
)
Contrasts set to contr.sum for the following variables: group.use
nice(m1)
Anova Table (Type 3 tests)
Response: value
Effect df MSE F ges p.value
1 group.use 2, 89 226.90 0.43 .003 .653
2 region 2.49, 221.80 230.88 57.69 *** .317 <.001
3 group.use:region 4.98, 221.80 230.88 2.02 + .031 .077
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘+’ 0.1 ‘ ’ 1
Sphericity correction method: GG
emmeans(m1, ~ group.use | region, contr = "pairwise")
$emmeans
region = CA1:
group.use emmean SE df lower.CL upper.CL
Highly resilient 1.767 1.82 89 -1.8442 5.38
Lower WTC-exposed -0.938 1.82 89 -4.5489 2.67
PTSD 4.522 1.85 89 0.8509 8.19
region = CA2.CA3:
group.use emmean SE df lower.CL upper.CL
Highly resilient 15.491 3.27 89 9.0009 21.98
Lower WTC-exposed 20.357 3.27 89 13.8668 26.85
PTSD 12.855 3.32 89 6.2579 19.45
region = CA4.DG:
group.use emmean SE df lower.CL upper.CL
Highly resilient 3.466 1.75 89 -0.0204 6.95
Lower WTC-exposed 3.779 1.75 89 0.2922 7.26
PTSD 4.890 1.78 89 1.3460 8.43
region = SR.SL.SM:
group.use emmean SE df lower.CL upper.CL
Highly resilient -0.831 1.54 89 -3.8938 2.23
Lower WTC-exposed -5.554 1.54 89 -8.6169 -2.49
PTSD 2.449 1.57 89 -0.6644 5.56
region = Subiculum:
group.use emmean SE df lower.CL upper.CL
Highly resilient -11.756 2.54 89 -16.8041 -6.71
Lower WTC-exposed -8.816 2.54 89 -13.8638 -3.77
PTSD -9.330 2.58 89 -14.4616 -4.20
Confidence level used: 0.95
$contrasts
region = CA1:
contrast estimate SE df t.ratio p.value
Highly resilient - (Lower WTC-exposed) 2.705 2.57 89 1.052 0.5461
Highly resilient - PTSD -2.755 2.59 89 -1.063 0.5395
(Lower WTC-exposed) - PTSD -5.459 2.59 89 -2.107 0.0942
region = CA2.CA3:
contrast estimate SE df t.ratio p.value
Highly resilient - (Lower WTC-exposed) -4.866 4.62 89 -1.053 0.5454
Highly resilient - PTSD 2.636 4.66 89 0.566 0.8386
(Lower WTC-exposed) - PTSD 7.502 4.66 89 1.611 0.2465
region = CA4.DG:
contrast estimate SE df t.ratio p.value
Highly resilient - (Lower WTC-exposed) -0.313 2.48 89 -0.126 0.9913
Highly resilient - PTSD -1.424 2.50 89 -0.569 0.8368
(Lower WTC-exposed) - PTSD -1.111 2.50 89 -0.444 0.8971
region = SR.SL.SM:
contrast estimate SE df t.ratio p.value
Highly resilient - (Lower WTC-exposed) 4.723 2.18 89 2.167 0.0826
Highly resilient - PTSD -3.280 2.20 89 -1.492 0.2994
(Lower WTC-exposed) - PTSD -8.003 2.20 89 -3.641 0.0013
region = Subiculum:
contrast estimate SE df t.ratio p.value
Highly resilient - (Lower WTC-exposed) -2.940 3.59 89 -0.818 0.6927
Highly resilient - PTSD -2.426 3.62 89 -0.670 0.7817
(Lower WTC-exposed) - PTSD 0.514 3.62 89 0.142 0.9889
P value adjustment: tukey method for comparing a family of 3 estimates
ggplot(df_long3, aes(group.use, value, fill = region)) +
stat_summary(
geom = "col",
fun = mean,
position = "dodge",
color = "black"
) +
stat_summary(
geom = "errorbar",
fun.data = mean_se,
position = position_dodge(.9),
width = 0.25,
color = "black"
) + theme_clean() + theme(axis.text.x=element_text(angle=45, hjust=1))+ geom_hline(yintercept = 0) + facet_wrap( ~ lat * region, scales = "fixed") + labs(title =
"Asymmetry index")
library(corrplot)
cordf <-
df%>% filter(!record_id %in% drop_ids & !is.na(affil_mean_mean)) %>% select(contains("mean_mean"), ends_with("pc") &
!contains("scid"))
cor_result <- Hmisc::rcorr(as.matrix(cordf))
cor_matrix <- cor_result$r # Correlation matrix
p_matrix <- cor_result$P # P-values matrix
significant_cor_matrix <- cor_matrix * (p_matrix <= 0.05)
corrplot(
significant_cor_matrix,
method = "color",
tl.col = "black",
outline = TRUE,
addrect = TRUE,
tl.cex = .5,
title = "p <.05",
tl.pos = "ld",
type = "lower"
)
significant_cor_matrix <- cor_matrix * (p_matrix <= 0.01)
corrplot(
significant_cor_matrix,
method = "color",
tl.col = "black",
outline = TRUE,
addrect = TRUE,
tl.cex = .5,
title = "p <.01",
tl.pos = "ld",
type = "lower"
)
ggplot(cordf, aes(x=`CA2-CA3_right_pc`, y=pov_2d_dist_mean_mean)) +
geom_point(size = 1) + theme_clean() + geom_smooth(method = "lm")
`geom_smooth()` using formula = 'y ~ x'
summary(lm(`CA2-CA3_right_pc` ~ pov_2d_dist_mean_mean,cordf))
Call:
lm(formula = `CA2-CA3_right_pc` ~ pov_2d_dist_mean_mean, data = cordf)
Residuals:
Min 1Q Median 3Q Max
-0.0048955 -0.0013655 -0.0002003 0.0017543 0.0051987
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.0077333 0.0027812 2.781 0.00694 **
pov_2d_dist_mean_mean 0.0008596 0.0003928 2.189 0.03192 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.002411 on 71 degrees of freedom
Multiple R-squared: 0.0632, Adjusted R-squared: 0.05001
F-statistic: 4.79 on 1 and 71 DF, p-value: 0.03192
ggplot(cordf, aes(x=`CA2-CA3_right_pc`, y=pov_3d_dist_mean_mean)) +
geom_point(size = 1) + theme_clean() + geom_smooth(method = "lm")
`geom_smooth()` using formula = 'y ~ x'
summary(lm(`CA2-CA3_right_pc` ~ pov_3d_dist_mean_mean,cordf))
Call:
lm(formula = `CA2-CA3_right_pc` ~ pov_3d_dist_mean_mean, data = cordf)
Residuals:
Min 1Q Median 3Q Max
-0.004932 -0.001439 -0.000150 0.001804 0.005235
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.0007289 0.0058604 0.124 0.9014
pov_3d_dist_mean_mean 0.0013150 0.0005894 2.231 0.0288 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.002408 on 71 degrees of freedom
Multiple R-squared: 0.06552, Adjusted R-squared: 0.05235
F-statistic: 4.978 on 1 and 71 DF, p-value: 0.02883
ggplot(cordf, aes(x=`CA2-CA3_right_pc`, y=neu_3d_angle_mean_mean)) +
geom_point(size = 1) + theme_clean() + geom_smooth(method = "lm")
`geom_smooth()` using formula = 'y ~ x'
summary(lm(`CA2-CA3_right_pc` ~ neu_3d_angle_mean_mean,cordf))
Call:
lm(formula = `CA2-CA3_right_pc` ~ neu_3d_angle_mean_mean, data = cordf)
Residuals:
Min 1Q Median 3Q Max
-0.0049395 -0.0013923 -0.0000898 0.0017558 0.0050299
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -0.01936 0.01506 -1.285 0.203
neu_3d_angle_mean_mean 0.02080 0.00945 2.201 0.031 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.00241 on 71 degrees of freedom
Multiple R-squared: 0.06389, Adjusted R-squared: 0.05071
F-statistic: 4.846 on 1 and 71 DF, p-value: 0.03096
library(corrplot)
cordf <-
df %>% filter(!record_id %in% drop_ids & !is.na(affil_mean_mean))%>% select(contains("mean_mean"), ends_with("asymmetry"))
cor_result <- Hmisc::rcorr(as.matrix(cordf))
cor_matrix <- cor_result$r # Correlation matrix
p_matrix <- cor_result$P # P-values matrix
significant_cor_matrix <- cor_matrix * (p_matrix <= 0.05)
corrplot(
significant_cor_matrix,
method = "color",
tl.col = "black",
outline = TRUE,
addrect = TRUE,
tl.cex = .7,
title = "p <.05",
tl.pos = "ld",
type = "lower"
)
significant_cor_matrix <- cor_matrix * (p_matrix <= 0.01)
corrplot(
significant_cor_matrix,
method = "color",
tl.col = "black",
outline = TRUE,
addrect = TRUE,
tl.cex = .7,
title = "p <.01",
tl.pos = "ld",
type = "lower"
)
NA
NA
Regressions also work with cm^3 controlling for ICV:
cordf <-
df%>% filter(!record_id %in% drop_ids & !is.na(affil_mean_mean)) %>% select(contains("mean_mean"), ends_with("cm3"))
summary(lm(`CA2-CA3_right_cm3` ~ pov_2d_dist_mean_mean,cordf))
Call:
lm(formula = `CA2-CA3_right_cm3` ~ pov_2d_dist_mean_mean, data = cordf)
Residuals:
Min 1Q Median 3Q Max
-0.07641 -0.02559 0.00238 0.02491 0.10251
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.115938 0.042755 2.712 0.00839 **
pov_2d_dist_mean_mean 0.012943 0.006038 2.144 0.03550 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.03706 on 71 degrees of freedom
Multiple R-squared: 0.06078, Adjusted R-squared: 0.04755
F-statistic: 4.595 on 1 and 71 DF, p-value: 0.0355
summary(lm(`CA2-CA3_right_cm3` ~ pov_3d_dist_mean_mean,cordf))
Call:
lm(formula = `CA2-CA3_right_cm3` ~ pov_3d_dist_mean_mean, data = cordf)
Residuals:
Min 1Q Median 3Q Max
-0.07600 -0.02598 0.00240 0.02479 0.10224
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.017293 0.090302 0.191 0.8487
pov_3d_dist_mean_mean 0.019113 0.009082 2.104 0.0389 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.0371 on 71 degrees of freedom
Multiple R-squared: 0.05872, Adjusted R-squared: 0.04546
F-statistic: 4.429 on 1 and 71 DF, p-value: 0.03888
summary(lm(`CA2-CA3_right_cm3` ~ neu_2d_angle_mean_mean,cordf))
Call:
lm(formula = `CA2-CA3_right_cm3` ~ neu_2d_angle_mean_mean, data = cordf)
Residuals:
Min 1Q Median 3Q Max
-0.082499 -0.026207 -0.000673 0.023983 0.096770
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.195934 0.013921 14.075 <0.0000000000000002 ***
neu_2d_angle_mean_mean 0.005612 0.006622 0.847 0.4
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.03805 on 71 degrees of freedom
Multiple R-squared: 0.01001, Adjusted R-squared: -0.003931
F-statistic: 0.7181 on 1 and 71 DF, p-value: 0.3996