Define sample

Note: The analyses use the sample of all subjects.

For all subjects, 8 pilot subjects were included. These were tested before formal preregistration.
For subset subjects, 8 pilot subjects were excluded.

tmpaEEG=read.csv(file.path(dir_res,"data_audio_signal_noise_N_33.tsv"), sep="\t",header=TRUE, dec=".")
#head(tmpaEEG)
# Analysis of visual P3
tmpvEEG=read.csv(file.path(dir_res,"data_visualP3_N_33.tsv"), sep="\t",header=TRUE, dec=".")
#head(tmpwmc)
tmpbeh=read.csv(file.path(dir_res,"data_logfiles.tsv"), sep="\t",header=TRUE, dec=".")
#head(tmpbeh)
tmpnasa=read.csv(file.path(dir_res,"data_NASA.tsv"), sep="\t",header=TRUE, dec=".")
#head(tmpnasa)
D=tmpbeh
D=merge(D, tmpaEEG, by = "fp")
D=merge(D, tmpnasa, by = "fp")
D=merge(D, tmpvEEG, by = "fp", all.x = TRUE)
rm(list=ls(pattern="tmp"))
if (any(as.numeric(table(D$fp))!=1)){
  stop("Subject numbers are not unique!")
  }
if (nowsample == "subset") {
  excludefps = 5:12
  indx = D$fp %in% excludefps
  D = D[!indx,]
  rm(indx)}
  #table(D$fp)

Quick analyses

Sample size: N = 33.

Sanity check for behavioral performance (across low and high load, and across frequencies):
Min number of hits (could be 0) : 41
Max number of hits (could be 96) : 96
Min number of false alarms (could be 0) : 0
Max number of false alarms (could be 302) : 68
Note that hits are correct responses between 200 and 1000 ms after target onset (defined in ASSR2_process_beh.R)
False alarms are responses at other times: 199*2 (number of nontarget trials times 2 blocks) - 96 (trial after a target) = 302.

D$HRlo20Hzcorr = (D$nHRlo20Hz + 0.5)/(96+1)
D$HRlo40Hzcorr = (D$nHRlo40Hz + 0.5)/(96+1)
D$HRlo80Hzcorr = (D$nHRlo80Hz + 0.5)/(96+1)
D$HRhi20Hzcorr = (D$nHRhi20Hz + 0.5)/(96+1)
D$HRhi40Hzcorr = (D$nHRhi40Hz + 0.5)/(96+1)
D$HRhi80Hzcorr = (D$nHRhi80Hz + 0.5)/(96+1)
# 48*2 = 96 targets
D$FAlo20Hzcorr = (D$nFAlo20Hz + 0.5)/(398+1-96)
D$FAlo40Hzcorr = (D$nFAlo40Hz + 0.5)/(398+1-96)
D$FAlo80Hzcorr = (D$nFAlo80Hz + 0.5)/(398+1-96)
D$FAhi20Hzcorr = (D$nFAhi20Hz + 0.5)/(398+1-96)
D$FAhi40Hzcorr = (D$nFAhi40Hz + 0.5)/(398+1-96)
D$FAhi80Hzcorr = (D$nFAhi80Hz + 0.5)/(398+1-96)
# 199*2 = 398 nontargets
# do not count the next trial after a target (because this is considered to be a valid response)
# Dprime
D$dprlo20Hz = qnorm(D$HRlo20Hzcorr) - qnorm(D$FAlo20Hzcorr)
D$dprlo40Hz = qnorm(D$HRlo40Hzcorr) - qnorm(D$FAlo40Hzcorr)
D$dprlo80Hz = qnorm(D$HRlo80Hzcorr) - qnorm(D$FAlo80Hzcorr)
D$dprhi20Hz = qnorm(D$HRhi20Hzcorr) - qnorm(D$FAhi20Hzcorr)
D$dprhi40Hz = qnorm(D$HRhi40Hzcorr) - qnorm(D$FAhi40Hzcorr)
D$dprhi80Hz = qnorm(D$HRhi80Hzcorr) - qnorm(D$FAhi80Hzcorr)
# do not compute criterion
#tmp$criterion = - (1/2) * (qnorm(tmp$aware_crit_corrected) + qnorm(tmp$aware_catch_corrected))
D$'dprlo-hi20Hz' = D$dprlo20Hz - D$dprhi20Hz
D$'dprlo-hi40Hz' = D$dprlo40Hz - D$dprhi40Hz
D$'dprlo-hi80Hz' = D$dprlo80Hz - D$dprhi80Hz
D$'meanRTmslo-hi20Hz' = D$meanRTmslo20Hz - D$meanRTmshi20Hz
D$'meanRTmslo-hi40Hz' = D$meanRTmslo40Hz - D$meanRTmshi40Hz
D$'meanRTmslo-hi80Hz' = D$meanRTmslo80Hz - D$meanRTmshi80Hz
# the numbers 1 to 2 refer to different blocks

# Amp S-N raw
D$AmpSmNno20Hz = rowMeans(cbind(D$AmpSmNno20_1,D$AmpSmNno20_2))
D$AmpSmNno40Hz = rowMeans(cbind(D$AmpSmNno40_1,D$AmpSmNno40_2))
D$AmpSmNno80Hz = rowMeans(cbind(D$AmpSmNno80_1,D$AmpSmNno80_2))
D$AmpSmNlo20Hz = rowMeans(cbind(D$AmpSmNlo20_1,D$AmpSmNlo20_2))
D$AmpSmNlo40Hz = rowMeans(cbind(D$AmpSmNlo40_1,D$AmpSmNlo40_2))
D$AmpSmNlo80Hz = rowMeans(cbind(D$AmpSmNlo80_1,D$AmpSmNlo80_2))
D$AmpSmNhi20Hz = rowMeans(cbind(D$AmpSmNhi20_1,D$AmpSmNhi20_2))
D$AmpSmNhi40Hz = rowMeans(cbind(D$AmpSmNhi40_1,D$AmpSmNhi40_2))
D$AmpSmNhi80Hz = rowMeans(cbind(D$AmpSmNhi80_1,D$AmpSmNhi80_2))

# Amp S raw
D$AmpSno20Hz = rowMeans(cbind(D$AmpSno20_1,D$AmpSno20_2))
D$AmpSno40Hz = rowMeans(cbind(D$AmpSno40_1,D$AmpSno40_2))
D$AmpSno80Hz = rowMeans(cbind(D$AmpSno80_1,D$AmpSno80_2))
D$AmpSlo20Hz = rowMeans(cbind(D$AmpSlo20_1,D$AmpSlo20_2))
D$AmpSlo40Hz = rowMeans(cbind(D$AmpSlo40_1,D$AmpSlo40_2))
D$AmpSlo80Hz = rowMeans(cbind(D$AmpSlo80_1,D$AmpSlo80_2))
D$AmpShi20Hz = rowMeans(cbind(D$AmpShi20_1,D$AmpShi20_2))
D$AmpShi40Hz = rowMeans(cbind(D$AmpShi40_1,D$AmpShi40_2))
D$AmpShi80Hz = rowMeans(cbind(D$AmpShi80_1,D$AmpShi80_2))

# Amp N raw
D$AmpNno20Hz = rowMeans(cbind(D$AmpNno20_1,D$AmpNno20_2))
D$AmpNno40Hz = rowMeans(cbind(D$AmpNno40_1,D$AmpNno40_2))
D$AmpNno80Hz = rowMeans(cbind(D$AmpNno80_1,D$AmpNno80_2))
D$AmpNlo20Hz = rowMeans(cbind(D$AmpNlo20_1,D$AmpNlo20_2))
D$AmpNlo40Hz = rowMeans(cbind(D$AmpNlo40_1,D$AmpNlo40_2))
D$AmpNlo80Hz = rowMeans(cbind(D$AmpNlo80_1,D$AmpNlo80_2))
D$AmpNhi20Hz = rowMeans(cbind(D$AmpNhi20_1,D$AmpNhi20_2))
D$AmpNhi40Hz = rowMeans(cbind(D$AmpNhi40_1,D$AmpNhi40_2))
D$AmpNhi80Hz = rowMeans(cbind(D$AmpNhi80_1,D$AmpNhi80_2))

# Amp SNR raw
D$AmpSNRno20Hz = rowMeans(cbind(D$AmpSNRno20_1,D$AmpSNRno20_2))
D$AmpSNRno40Hz = rowMeans(cbind(D$AmpSNRno40_1,D$AmpSNRno40_2))
D$AmpSNRno80Hz = rowMeans(cbind(D$AmpSNRno80_1,D$AmpSNRno80_2))
D$AmpSNRlo20Hz = rowMeans(cbind(D$AmpSNRlo20_1,D$AmpSNRlo20_2))
D$AmpSNRlo40Hz = rowMeans(cbind(D$AmpSNRlo40_1,D$AmpSNRlo40_2))
D$AmpSNRlo80Hz = rowMeans(cbind(D$AmpSNRlo80_1,D$AmpSNRlo80_2))
D$AmpSNRhi20Hz = rowMeans(cbind(D$AmpSNRhi20_1,D$AmpSNRhi20_2))
D$AmpSNRhi40Hz = rowMeans(cbind(D$AmpSNRhi40_1,D$AmpSNRhi40_2))
D$AmpSNRhi80Hz = rowMeans(cbind(D$AmpSNRhi80_1,D$AmpSNRhi80_2))
# the numbers 1 to 2 refer to different blocks

# ITC S-N raw
D$ItcSmNno20Hz = rowMeans(cbind(D$ItcSmNno20_1,D$ItcSmNno20_2))
D$ItcSmNno40Hz = rowMeans(cbind(D$ItcSmNno40_1,D$ItcSmNno40_2))
D$ItcSmNno80Hz = rowMeans(cbind(D$ItcSmNno80_1,D$ItcSmNno80_2))
D$ItcSmNlo20Hz = rowMeans(cbind(D$ItcSmNlo20_1,D$ItcSmNlo20_2))
D$ItcSmNlo40Hz = rowMeans(cbind(D$ItcSmNlo40_1,D$ItcSmNlo40_2))
D$ItcSmNlo80Hz = rowMeans(cbind(D$ItcSmNlo80_1,D$ItcSmNlo80_2))
D$ItcSmNhi20Hz = rowMeans(cbind(D$ItcSmNhi20_1,D$ItcSmNhi20_2))
D$ItcSmNhi40Hz = rowMeans(cbind(D$ItcSmNhi40_1,D$ItcSmNhi40_2))
D$ItcSmNhi80Hz = rowMeans(cbind(D$ItcSmNhi80_1,D$ItcSmNhi80_2))

# ITC S raw
D$ItcSno20Hz = rowMeans(cbind(D$ItcSno20_1,D$ItcSno20_2))
D$ItcSno40Hz = rowMeans(cbind(D$ItcSno40_1,D$ItcSno40_2))
D$ItcSno80Hz = rowMeans(cbind(D$ItcSno80_1,D$ItcSno80_2))
D$ItcSlo20Hz = rowMeans(cbind(D$ItcSlo20_1,D$ItcSlo20_2))
D$ItcSlo40Hz = rowMeans(cbind(D$ItcSlo40_1,D$ItcSlo40_2))
D$ItcSlo80Hz = rowMeans(cbind(D$ItcSlo80_1,D$ItcSlo80_2))
D$ItcShi20Hz = rowMeans(cbind(D$ItcShi20_1,D$ItcShi20_2))
D$ItcShi40Hz = rowMeans(cbind(D$ItcShi40_1,D$ItcShi40_2))
D$ItcShi80Hz = rowMeans(cbind(D$ItcShi80_1,D$ItcShi80_2))

# ITC N raw
D$ItcNno20Hz = rowMeans(cbind(D$ItcNno20_1,D$ItcNno20_2))
D$ItcNno40Hz = rowMeans(cbind(D$ItcNno40_1,D$ItcNno40_2))
D$ItcNno80Hz = rowMeans(cbind(D$ItcNno80_1,D$ItcNno80_2))
D$ItcNlo20Hz = rowMeans(cbind(D$ItcNlo20_1,D$ItcNlo20_2))
D$ItcNlo40Hz = rowMeans(cbind(D$ItcNlo40_1,D$ItcNlo40_2))
D$ItcNlo80Hz = rowMeans(cbind(D$ItcNlo80_1,D$ItcNlo80_2))
D$ItcNhi20Hz = rowMeans(cbind(D$ItcNhi20_1,D$ItcNhi20_2))
D$ItcNhi40Hz = rowMeans(cbind(D$ItcNhi40_1,D$ItcNhi40_2))
D$ItcNhi80Hz = rowMeans(cbind(D$ItcNhi80_1,D$ItcNhi80_2))

# ITC SNR raw
D$ItcSNRno20Hz = rowMeans(cbind(D$ItcSNRno20_1,D$ItcSNRno20_2))
D$ItcSNRno40Hz = rowMeans(cbind(D$ItcSNRno40_1,D$ItcSNRno40_2))
D$ItcSNRno80Hz = rowMeans(cbind(D$ItcSNRno80_1,D$ItcSNRno80_2))
D$ItcSNRlo20Hz = rowMeans(cbind(D$ItcSNRlo20_1,D$ItcSNRlo20_2))
D$ItcSNRlo40Hz = rowMeans(cbind(D$ItcSNRlo40_1,D$ItcSNRlo40_2))
D$ItcSNRlo80Hz = rowMeans(cbind(D$ItcSNRlo80_1,D$ItcSNRlo80_2))
D$ItcSNRhi20Hz = rowMeans(cbind(D$ItcSNRhi20_1,D$ItcSNRhi20_2))
D$ItcSNRhi40Hz = rowMeans(cbind(D$ItcSNRhi40_1,D$ItcSNRhi40_2))
D$ItcSNRhi80Hz = rowMeans(cbind(D$ItcSNRhi80_1,D$ItcSNRhi80_2))
# visual P3 is difference between targets and nontargets.
# the numbers 1 to 4 refer to different blocks

D$vP3lo20 = rowMeans(cbind(D$vP3_lo_tar20_1 - D$vP3_lo_non20_1, D$vP3_lo_tar20_2 - D$vP3_lo_non20_2))
D$vP3lo40 = rowMeans(cbind(D$vP3_lo_tar40_1 - D$vP3_lo_non40_1, D$vP3_lo_tar40_2 - D$vP3_lo_non40_2))
D$vP3lo80 = rowMeans(cbind(D$vP3_lo_tar80_1 - D$vP3_lo_non80_1, D$vP3_lo_tar80_2 - D$vP3_lo_non80_2))

D$vP3hi20 = rowMeans(cbind(D$vP3_hi_tar20_1 - D$vP3_hi_non20_1, D$vP3_hi_tar20_2 - D$vP3_hi_non20_2))
D$vP3hi40 = rowMeans(cbind(D$vP3_hi_tar40_1 - D$vP3_hi_non40_1, D$vP3_hi_tar40_2 - D$vP3_hi_non40_2))
D$vP3hi80 = rowMeans(cbind(D$vP3_hi_tar80_1 - D$vP3_hi_non80_1, D$vP3_hi_tar80_2 - D$vP3_hi_non80_2))

D$'vP3lo-hi20' = D$vP3lo20 - D$vP3hi20
D$'vP3lo-hi40' = D$vP3lo40 - D$vP3hi40
D$'vP3lo-hi80' = D$vP3lo80 - D$vP3hi80

Quick look at behavioral performance:
Simple hit rates (%) were as follows:
20-Hz AM:
Low load = 95.55
High load = 76.99
40-Hz AM:
Low load = 96.14
High load = 80.49
80-Hz AM:
Low load = 94.99
High load = 79.4

Manipulation checks of load

lo = low load
hi = high load
lo-hi = low minus high load

20, 40, 80 Hz = amplitude modulation frequency

LL and UL refer to the 95% confidence interval (from two-tailed t tests).

d prime and reaction time

dpr = d prime
meanRTms = RT to hits (ms)
Note: Because there was no task during no load, there were no targets and nontargets to examine d prime and RT.

table

Dtmp = subset(D, select=c('dprlo20Hz', 'dprhi20Hz', 'dprlo-hi20Hz',
                          'dprlo40Hz', 'dprhi40Hz', 'dprlo-hi40Hz',
                          'dprlo80Hz', 'dprhi80Hz', 'dprlo-hi80Hz',
                          'meanRTmslo20Hz', 'meanRTmshi20Hz', 'meanRTmslo-hi20Hz',
                          'meanRTmslo40Hz', 'meanRTmshi40Hz', 'meanRTmslo-hi40Hz',
                          'meanRTmslo80Hz', 'meanRTmshi80Hz', 'meanRTmslo-hi80Hz'))
RmCI = tableCIs(Dtmp)
RmCI %>%
  kable(digits = 3) %>%
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"), 
                full_width = F, position = 'left')
Variable Mean LL UL N
dprlo20Hz 4.370 4.074 4.667 33
dprhi20Hz 2.483 2.220 2.745 33
dprlo-hi20Hz 1.888 1.582 2.193 33
dprlo40Hz 4.355 4.111 4.598 33
dprhi40Hz 2.569 2.345 2.794 33
dprlo-hi40Hz 1.785 1.560 2.011 33
dprlo80Hz 4.309 4.014 4.604 33
dprhi80Hz 2.449 2.226 2.671 33
dprlo-hi80Hz 1.861 1.585 2.136 33
meanRTmslo20Hz 366.053 348.407 383.699 33
meanRTmshi20Hz 481.749 462.601 500.898 33
meanRTmslo-hi20Hz -115.696 -133.520 -97.872 33
meanRTmslo40Hz 371.402 352.802 390.002 33
meanRTmshi40Hz 489.349 467.869 510.830 33
meanRTmslo-hi40Hz -117.947 -135.053 -100.841 33
meanRTmslo80Hz 366.977 353.100 380.853 33
meanRTmshi80Hz 489.550 470.105 508.996 33
meanRTmslo-hi80Hz -122.574 -139.461 -105.687 33
#(RmCI, file = paste0(file.path(dir_res,"table_descr_performance_",nowsample,"_subjects.tsv")), row.names = F, dec = ".", sep = "\t")

figure

Dtmp = subset(D, select=c('dprlo-hi20Hz', 'dprlo-hi40Hz', 'dprlo-hi80Hz'))
myylim = c(min(Dtmp), max(Dtmp)) 
RmCI = tableCIs(Dtmp)
#RmCI
Ddpr = RmCI[1:3,]
Dtmp = cbind(D$fp, Dtmp)
Dtmp = na.omit(Dtmp)
colnames(Dtmp) = c('fp','lo-hi20Hz','lo-hi40Hz','lo-hi80Hz')
bp1 = plotoverlay(dm = Dtmp, lbl = "d´", dvy = "Sensitivity (d´)", myylim)

Dtmp = subset(D, select=c('meanRTmslo-hi20Hz', 'meanRTmslo-hi40Hz', 'meanRTmslo-hi80Hz'))
myylim = c(min(Dtmp), max(Dtmp)) 
RmCI = tableCIs(Dtmp)
#RmCI
DRT = RmCI[1:3,1:4]

Dtmp = cbind(D$fp, Dtmp)
Dtmp = na.omit(Dtmp)
colnames(Dtmp) = c('fp','lo-hi20Hz','lo-hi40Hz','lo-hi80Hz')
bp2 = plotoverlay(dm = Dtmp, lbl = "RT", dvy = "RT (ms)", myylim)
grid.arrange(bp1, bp2, ncol = 2)

Ddpr$Condition = c("20 Hz", "40 Hz", "80 Hz")
DRT$Condition = c("20 Hz", "40 Hz", "80 Hz")
Ddpr$Condition = factor(Ddpr$Condition, levels=c("20 Hz", "40 Hz", "80 Hz"))
DRT$Condition = factor(DRT$Condition, levels=c("20 Hz", "40 Hz", "80 Hz"))
fig_dpr = ggplot(Ddpr, aes(x=Condition, y=Mean, fill=Condition)) + 
  geom_bar(stat="identity"
          ,color="black" # add black border to each bar
          ,position=position_dodge(), show.legend=FALSE) + # separare bars
  theme_bw() + # get rid of background
  theme(panel.grid.major = element_blank(),
        panel.grid.minor = element_blank()) + #no grid lines
  geom_hline(yintercept = 0)  +
  geom_errorbar(position=position_dodge(.9), width=.25, 
                aes(ymin=LL, ymax=UL)) + 
  scale_fill_manual(
        values = c("#999999", "#CCCCCC", "#FFFFFF")) +
  labs(title = paste0("d´(N = ", nrow(D),")")) +
    theme(plot.title = element_text(hjust = 0.5)) +
  labs(x = "Low minus high load") +
  labs(y = "Sensitivity (d´)")
fig_RT = ggplot(DRT, aes(x=Condition, y=Mean, fill=Condition)) + 
  geom_bar(stat="identity"
          ,color="black" # add black border to each bar
          ,position=position_dodge(), show.legend=FALSE) + # separare bars
  theme_bw() + # get rid of background
  theme(panel.grid.major = element_blank(),
        panel.grid.minor = element_blank()) + #no grid lines
  geom_hline(yintercept = 0)  +
  geom_errorbar(position=position_dodge(.9), width=.25, 
                aes(ymin=LL, ymax=UL)) + 
  scale_fill_manual(
        values = c("#999999", "#CCCCCC", "#FFFFFF")) +
  labs(title = paste0("RT (N = ", nrow(D),")")) +
    theme(plot.title = element_text(hjust = 0.5)) +
  labs(x = "Low minus high load") +
  labs(y = "Reaction time (ms)")
grid.arrange(fig_dpr, fig_RT, ncol = 2)

bp1 = arrangeGrob(fig_dpr, fig_RT, ncol = 2)
ggsave(file.path(dir_fig,"figure_performance.jpg"), bp1, dpi = 600, width = 7, height = 4)
ggsave(file.path(dir_fig,"figure_performance.pdf"), bp1, dpi = 600, width = 7, height = 4)
rm(Ddpr, DRT, fig_dpr, fig_RT, bp1, RmCI)

ANOVA

Analyze the factorial design (load x frequency) with repeated-measures ANOVA:

load: low and high
modulation frequency: 20, 40, 80 Hz

Dtmp1a = subset(D, select=c(fp, dprlo20Hz, dprlo40Hz, dprlo80Hz, 
                                dprhi20Hz, dprhi40Hz, dprhi80Hz))
Dtmp1b = subset(D, select=c(fp, meanRTmslo20Hz, meanRTmslo40Hz, meanRTmslo80Hz, 
                                meanRTmshi20Hz, meanRTmshi40Hz, meanRTmshi80Hz))
Dtmp1 = list(Dtmp1a, Dtmp1b)
Dvars = c("d´",'RT')
Fres = (matrix(ncol = 4, nrow = length(Dvars)))
Fres = as.data.frame(Fres)
colnames(Fres) = c('Variable','Overall_Interaction_p','BF01_Interaction', 'BF01_error%')
d prime
Fres = computeANOVA(1, Dtmp1[[1]], mylvls = c('low','high'))

## =====================================================================
##                         d´
## =====================================================================
## 
## 
## Descriptives
## ============
##  load frequency  N     Mean    CI_LL    CI_UL
##   low        20 33 4.370138 4.073691 4.666584
##   low        40 33 4.354547 4.110703 4.598391
##   low        80 33 4.309363 4.014338 4.604388
##  high        20 33 2.482509 2.219678 2.745340
##  high        40 33 2.569213 2.344854 2.793571
##  high        80 33 2.448713 2.226218 2.671207
## 
## 
## Anova
## =====
## 
## Univariate Type III Repeated-Measures ANOVA Assuming Sphericity
## 
##                 Sum Sq num Df Error SS den Df   F value Pr(>F)    
## (Intercept)    2319.16      1   61.248     32 1211.6901 <2e-16 ***
## load            168.41      1   15.088     32  357.1987 <2e-16 ***
## frequency         0.23      2   13.365     64    0.5459 0.5820    
## load:frequency    0.09      2   12.946     64    0.2293 0.7958    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## 
## Mauchly Tests for Sphericity
## 
##                Test statistic p-value
## frequency             0.98458 0.78588
## load:frequency        0.78056 0.02149
## 
## 
## Greenhouse-Geisser and Huynh-Feldt Corrections
##  for Departure from Sphericity
## 
##                 GG eps Pr(>F[GG])
## frequency      0.98481     0.5794
## load:frequency 0.82005     0.7518
## 
##                   HF eps Pr(>F[HF])
## frequency      1.0488947  0.5820013
## load:frequency 0.8584233  0.7621508
## 
## 
## BF without vs with interaction
## ==============================
## Bayes factor analysis
## --------------
## [1] load + frequency + fp : 9.245612 ±3.19%
## 
## Against denominator:
##   dv ~ load + frequency + load:frequency + fp 
## ---
## Bayes factor type: BFlinearModel, JZS
RT (ms)
Fres = computeANOVA(2, Dtmp1[[2]], mylvls = c('low','high'))

## =====================================================================
##                         RT
## =====================================================================
## 
## 
## Descriptives
## ============
##  load frequency  N     Mean    CI_LL    CI_UL
##   low        20 33 366.0533 348.4075 383.6991
##   low        40 33 371.4023 352.8021 390.0024
##   low        80 33 366.9766 353.1000 380.8532
##  high        20 33 481.7493 462.6009 500.8978
##  high        40 33 489.3494 467.8692 510.8297
##  high        80 33 489.5503 470.1049 508.9957
## 
## 
## Anova
## =====
## 
## Univariate Type III Repeated-Measures ANOVA Assuming Sphericity
## 
##                  Sum Sq num Df Error SS den Df   F value Pr(>F)    
## (Intercept)    36188029      1   388803     32 2978.4135 <2e-16 ***
## load             697898      1    93164     32  239.7144 <2e-16 ***
## frequency          1439      2    20541     64    2.2418 0.1145    
## load:frequency      406      2    20794     64    0.6244 0.5388    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## 
## Mauchly Tests for Sphericity
## 
##                Test statistic p-value
## frequency              0.8463 0.07527
## load:frequency         0.9727 0.65112
## 
## 
## Greenhouse-Geisser and Huynh-Feldt Corrections
##  for Departure from Sphericity
## 
##                 GG eps Pr(>F[GG])
## frequency      0.86678     0.1225
## load:frequency 0.97342     0.5347
## 
##                  HF eps Pr(>F[HF])
## frequency      0.912019  0.1197622
## load:frequency 1.035598  0.5387909
## 
## 
## BF without vs with interaction
## ==============================
## Bayes factor analysis
## --------------
## [1] load + frequency + fp : 9.085288 ±2.34%
## 
## Against denominator:
##   dv ~ load + frequency + load:frequency + fp 
## ---
## Bayes factor type: BFlinearModel, JZS

ANOVA summary

Analyze the factorial design (load x frequency) with repeated-measures ANOVA:

load: low and high
modulation frequency: 20, 40, 80 Hz

An interaction would suggest that load effects differed among the modulation frequencies.

Summary of interaction analyses:
* Overall_interaction has 2 dfs.
* BF01_interaction is the BF for a model without the overall interaction versus a model with the overall interaction (prior: Cauchy r scale = 0.5).
* BF01_error% estimates the error of the BF in percent. For example, if BF = 10 and the error is 10%, then the BF is estimated to vary between 9 and 11.

Fres[,2:4] = round(Fres[,2:4], digits = 3)
Fres[Fres < 0.001] = 0.001
Fres %>%
  kable(digits = 3) %>%
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"), 
                full_width = F, position = 'left')
Variable Overall_Interaction_p BF01_Interaction BF01_error%
d´ 0.752 9.246 3.192
RT 0.535 9.085 2.337

visual P3

visual P3 = mean amplitude (between 300 and 400 ms) to targets minus nontargets
Note: Because there was no task during no load, there were no targets and nontargets to examine the P3.

table

Dtmp = subset(D, select=c('vP3lo20', 'vP3hi20', 'vP3lo-hi20',
                          'vP3lo40', 'vP3hi40', 'vP3lo-hi40',
                          'vP3lo80', 'vP3hi80', 'vP3lo-hi80'))
RmCI = tableCIs(Dtmp)
RmCI %>%
  kable(digits = 3) %>%
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"), 
                full_width = F, position = 'left')
Variable Mean LL UL N
vP3lo20 9.566 7.792 11.339 33
vP3hi20 3.564 2.233 4.894 33
vP3lo-hi20 6.002 4.247 7.757 33
vP3lo40 9.700 8.227 11.172 33
vP3hi40 3.290 2.001 4.579 33
vP3lo-hi40 6.410 5.276 7.543 33
vP3lo80 9.974 8.401 11.547 33
vP3hi80 3.891 2.834 4.949 33
vP3lo-hi80 6.083 4.634 7.531 33

figure

Dtmp = subset(D, select=c('vP3lo-hi20', 'vP3lo-hi40', 'vP3lo-hi80'))
RmCI = tableCIs(Dtmp)
myylim = c(min(Dtmp), max(Dtmp)) 
Dtmp = cbind(D$fp, Dtmp)
Dtmp = na.omit(Dtmp)
colnames(Dtmp) = c('fp','lo-hi20Hz','lo-hi40Hz','lo-hi80Hz')
bp1 = plotoverlay(dm = Dtmp,lbl = "Visual P3", dvy = "Mean amplitude (µV)", myylim)
plot(bp1)

RmCI$Variable = c("20 Hz", "40 Hz", "80 Hz")
fig_P3 = ggplot(RmCI, aes(x=Variable, y=Mean, fill=Variable)) + 
  geom_bar(stat="identity"
          ,color="black" # add black border to each bar
          ,position=position_dodge(), show.legend=TRUE) + # separare bars
  theme_bw() + # get rid of background
  theme(panel.grid.major = element_blank(),
        panel.grid.minor = element_blank()) + #no grid lines
  geom_hline(yintercept = 0)  +
  geom_errorbar(position=position_dodge(.9), width=.25, 
                aes(ymin=LL, ymax=UL)) + 
  scale_fill_manual(
        values = c("#999999", "#CCCCCC", "#FFFFFF"),
        name = "Frequency") +
  labs(title = paste0("Visual P3 (N = ", nrow(D),")")) +
    theme(plot.title = element_text(hjust = 0.5)) +
  labs(x = "Low minus high load") +
  labs(y = "Mean amplitude (µV)")
plot(fig_P3)

filename = "figure_visual_P3"
ggsave(file.path(dir_fig,paste0(filename,'.jpg')), fig_P3, dpi = 600, width = 7, height = 4)
ggsave(file.path(dir_fig,paste0(filename,'.pdf')), fig_P3, dpi = 600, width = 7, height = 4)
#rm(fig_P3, RmCI, filename)

ANOVA

Analyze the factorial design (load x frequency) with repeated-measures ANOVA:

load: low and high
modulation frequency: 20, 40, 80 Hz

Dtmp1a = subset(D, select=c(fp, vP3lo20, vP3lo40, vP3lo80, 
                                vP3hi20, vP3hi40, vP3hi80))
# rename because Hz is missing at the end
colnames(Dtmp1a) = c('fp', 'vP3lo20Hz', 'vP3lo40Hz', 'vP3lo80Hz', 
                           'vP3hi20Hz', 'vP3hi40Hz', 'vP3hi80Hz')
Dtmp1 = list(Dtmp1a)
Dvars = c("Visual P3")
Fres = (matrix(ncol = 4, nrow = length(Dvars)))
Fres = as.data.frame(Fres)
colnames(Fres) = c('Variable','Overall_Interaction_p','BF01_Interaction', 'BF01_error%')
Fres = computeANOVA(1, Dtmp1[[1]], mylvls = c('low','high'))

## =====================================================================
##                         Visual P3
## =====================================================================
## 
## 
## Descriptives
## ============
##  load frequency  N     Mean    CI_LL     CI_UL
##   low        20 33 9.565664 7.791973 11.339356
##   low        40 33 9.699620 8.227182 11.172059
##   low        80 33 9.974289 8.401440 11.547139
##  high        20 33 3.563677 2.232946  4.894407
##  high        40 33 3.290102 2.000892  4.579313
##  high        80 33 3.891436 2.833961  4.948910
## 
## 
## Anova
## =====
## 
## Univariate Type III Repeated-Measures ANOVA Assuming Sphericity
## 
##                Sum Sq num Df Error SS den Df  F value    Pr(>F)    
## (Intercept)    8793.3      1  2085.96     32 134.8951 5.158e-13 ***
## load           1881.2      1   520.63     32 115.6270 3.726e-12 ***
## frequency         7.3      2   232.13     64   1.0077    0.3708    
## load:frequency    1.5      2   301.73     64   0.1629    0.8500    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## 
## Mauchly Tests for Sphericity
## 
##                Test statistic  p-value
## frequency             0.75591 0.013072
## load:frequency        0.83321 0.059111
## 
## 
## Greenhouse-Geisser and Huynh-Feldt Corrections
##  for Departure from Sphericity
## 
##                 GG eps Pr(>F[GG])
## frequency      0.80380     0.3571
## load:frequency 0.85705     0.8176
## 
##                   HF eps Pr(>F[HF])
## frequency      0.8398650  0.3599198
## load:frequency 0.9008364  0.8283076
## 
## 
## BF without vs with interaction
## ==============================
## Bayes factor analysis
## --------------
## [1] load + frequency + fp : 9.775045 ±2.63%
## 
## Against denominator:
##   dv ~ load + frequency + load:frequency + fp 
## ---
## Bayes factor type: BFlinearModel, JZS

ANOVA summary

Analyze the factorial design (load x frequency) with repeated-measures ANOVA:

load: low and high
modulation frequency: 20, 40, 80 Hz

An interaction would suggest that load effects differed among the modulation frequencies.

Summary of interaction analyses:
* Overall_interaction has 2 dfs.
* BF01_interaction is the BF for a model without the overall interaction versus a model with the overall interaction (prior: Cauchy r scale = 0.5).
* BF01_error% estimates the error of the BF in percent. For example, if BF = 10 and the error is 10%, then the BF is estimated to vary between 9 and 11.

Fres[,2:4] = round(Fres[,2:4], digits = 3)
Fres[Fres < 0.001] = 0.001
Fres %>%
  kable(digits = 3) %>%
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"), 
                full_width = F, position = 'left')
Variable Overall_Interaction_p BF01_Interaction BF01_error%
Visual P3 0.818 9.775 2.629

workload ratings (NASA-TLX)

workload ratings = mental demand and effort

table

Dnasa = data.frame()
tmpRmCI = data.frame(row.names = NULL)[1:18, ]
for (c in c('Mental', 'Effort')){
  Dtmp = getdiffs(D, iv = c)
  Dtmp = Dtmp[,-c(1:9)]
  myylim = c(min(Dtmp), max(Dtmp)) 
  RmCI = tableCIs(Dtmp)
  #write.table(RmCI, file = paste0("Table_descr_",c,"_",nowsample,"_subjects.txt"),
  #            row.names = F, dec = ".", sep = "\t")
  tmpRmCI = cbind(tmpRmCI, RmCI)
  
  Dtmp2 = RmCI
  Dtmp2$var = c
  Dnasa = rbind(Dnasa, Dtmp2)
  
  Dtmp = cbind(D$fp, Dtmp)
  Dtmp = na.omit(Dtmp)
  colnames(Dtmp)[1] = 'fp'
  #bp1 = plotoverlay(dm = Dtmp, lbl = paste0("NASA ", c), dvy = "Mean rating", myylim)
  #plot(bp1)
}
rownames(tmpRmCI) = NULL
tmpRmCI = tmpRmCI[,-c(5,6)]
tmpRmCI = subset(tmpRmCI, select=c(Variable, N, Mean, LL, UL, Mean.1, LL.1, UL.1))
tmpRmCI %>%
  kable(digits = 3,
        #caption = paste0("Workload ratings (N = ", nrow(D),")"),
        col.names = c('Condition','N','Mean','LL','UL','Mean','LL','UL')) %>%
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"),
                full_width = F, position = 'left') %>%
  add_header_above(c(" " = 2, "Mental demand" = 3, "Effort" = 3))
Mental demand
Effort
Condition N Mean LL UL Mean LL UL
no20Hz 33 16.561 11.272 21.849 15.167 9.666 20.667
lo20Hz 33 25.485 20.072 30.897 25.818 20.091 31.545
hi20Hz 33 38.864 32.794 44.933 40.348 33.873 46.824
no-lo20Hz 33 -8.924 -14.027 -3.822 -10.652 -15.918 -5.385
no-hi20Hz 33 -22.303 -28.381 -16.225 -25.182 -32.000 -18.364
lo-hi20Hz 33 -13.379 -17.596 -9.161 -14.530 -20.882 -8.179
no40Hz 33 15.318 10.419 20.218 13.273 8.768 17.778
lo40Hz 33 24.667 19.693 29.640 25.833 19.621 32.046
hi40Hz 33 38.606 33.052 44.160 42.167 36.613 47.721
no-lo40Hz 33 -9.348 -13.685 -5.012 -12.561 -18.071 -7.050
no-hi40Hz 33 -23.288 -28.837 -17.738 -28.894 -33.968 -23.819
lo-hi40Hz 33 -13.939 -17.357 -10.522 -16.333 -21.252 -11.415
no80Hz 33 14.470 9.980 18.960 13.212 9.094 17.330
lo80Hz 33 26.500 21.268 31.732 29.030 22.272 35.789
hi80Hz 33 39.348 32.801 45.896 41.939 35.256 48.623
no-lo80Hz 33 -12.030 -16.096 -7.965 -15.818 -20.678 -10.958
no-hi80Hz 33 -24.879 -31.866 -17.892 -28.727 -35.584 -21.870
lo-hi80Hz 33 -12.848 -17.441 -8.256 -12.909 -18.676 -7.142
colnames(Dnasa)[1] = 'Condition'
colnames(Dnasa)[6] = 'Variable'
tmp = Dnasa$Condition %in% c('no20Hz', 'lo20Hz', 'hi20Hz',
                             'no40Hz', 'lo40Hz', 'hi40Hz',
                             'no80Hz', 'lo80Hz', 'hi80Hz')
Dnasa = Dnasa[tmp,]
Dnasa$Condition = factor(Dnasa$Condition, 
                         levels=c('no20Hz', 'lo20Hz', 'hi20Hz',
                                  'no40Hz', 'lo40Hz', 'hi40Hz',
                                  'no80Hz', 'lo80Hz', 'hi80Hz'))
Dnasa$Variable = factor(Dnasa$Variable, levels=c("Mental", "Effort"))
rm(c, bp1, bp2, tmp, Dtmp, Dtmp2, tmpRmCI, RmCI)

figure

colnames(Dnasa)[1] = 'Cond'
Dnasa$Freq = NA
Dnasa$Freq[grepl(pattern = "20", Dnasa$Cond)] = 20
Dnasa$Freq[grepl(pattern = "40", Dnasa$Cond)] = 40
Dnasa$Freq[grepl(pattern = "80", Dnasa$Cond)] = 80
Dnasa$Freq = factor(Dnasa$Freq)
Dnasa$Condition = NA
Dnasa$Condition[grepl(pattern = "no", Dnasa$Cond)] = 'no'
Dnasa$Condition[grepl(pattern = "lo", Dnasa$Cond)] = 'low'
Dnasa$Condition[grepl(pattern = "hi", Dnasa$Cond)] = 'high'
Dnasa$Condition = factor(Dnasa$Condition, 
                         levels=c('no', 'low', 'high'))
Dtmp = Dnasa[Dnasa$Variable=='Mental',]
fig_mental = ggplot(Dtmp, aes(x=Freq, y=Mean, fill=Condition)) + 
  geom_bar(stat="identity"
           ,color="black" # add black border to each bar
           ,position=position_dodge(), show.legend=TRUE) + # separate bars
  theme_bw() + # get rid of background
  theme(panel.grid.major = element_blank(),
        panel.grid.minor = element_blank()) + #no grid lines
  geom_hline(yintercept = 0)  +
  geom_errorbar(position=position_dodge(.9), width=.25, 
                aes(ymin=LL, ymax=UL)) + 
  scale_fill_manual(
    values = c("#FFFFFF", "#CCCCCC", "#999999")) +
  labs(title = paste0("Mental demand (N = ", nrow(D),")")) +
  theme(plot.title = element_text(hjust = 0.5)) +
  labs(x = "Frequency (Hz)") +
  labs(y = "Mean rating") + 
  ylim(0, 50)
Dtmp = Dnasa[Dnasa$Variable=='Effort',]
fig_effort = ggplot(Dtmp, aes(x=Freq, y=Mean, fill=Condition)) + 
  geom_bar(stat="identity"
           ,color="black" # add black border to each bar
           ,position=position_dodge(), show.legend=TRUE) + # separate bars
  theme_bw() + # get rid of background
  theme(panel.grid.major = element_blank(),
        panel.grid.minor = element_blank()) + #no grid lines
  geom_hline(yintercept = 0)  +
  geom_errorbar(position=position_dodge(.9), width=.25, 
                aes(ymin=LL, ymax=UL)) + 
  scale_fill_manual(
    values = c("#FFFFFF", "#CCCCCC", "#999999")) +
  labs(title = paste0("Effort (N = ", nrow(D),")")) +
  theme(plot.title = element_text(hjust = 0.5)) +
  labs(x = "Frequency (Hz)") +
  labs(y = "Mean rating") +
  ylim(0, 50)
grid.arrange(fig_mental, fig_effort, ncol = 2)

bp1 = arrangeGrob(fig_mental, fig_effort, ncol = 2)
filename = "figure_NASA_ratings"
ggsave(file.path(dir_fig,paste0(filename,'.jpg')), bp1, dpi = 600, width = 7, height = 4)
ggsave(file.path(dir_fig,paste0(filename,'.pdf')), bp1, dpi = 600, width = 7, height = 4)
rm(bp1, Dnasa, Dtmp, fig_mental, fig_effort, filename)

ANOVA

Analyze the factorial design (load x frequency) with repeated-measures ANOVA:

load: no, low, high
modulation frequency: 20, 40, 80 Hz

Dtmp1a = subset(D, select=c(fp, Mentalno20Hz, Mentalno40Hz, Mentalno80Hz, 
                                Mentallo20Hz, Mentallo40Hz, Mentallo80Hz,
                                Mentalhi20Hz, Mentalhi40Hz, Mentalhi80Hz))
Dtmp1b = subset(D, select=c(fp, Effortno20Hz, Effortno40Hz, Effortno80Hz, 
                                Effortlo20Hz, Effortlo40Hz, Effortlo80Hz,  
                                Efforthi20Hz, Efforthi40Hz, Efforthi80Hz))
Dtmp1 = list(Dtmp1a, Dtmp1b)
Dvars = c("Mental", "Effort")
Fres = (matrix(ncol = 4, nrow = length(Dvars)))
Fres = as.data.frame(Fres)
colnames(Fres) = c('Variable','Overall_Interaction_p','BF01_Interaction', 'BF01_error%')
Mental demand
Fres = computeANOVA(1, Dtmp1[[1]], mylvls = c('no','low','high'))

## =====================================================================
##                         Mental
## =====================================================================
## 
## 
## Descriptives
## ============
##  load frequency  N     Mean     CI_LL    CI_UL
##    no        20 33 16.56061 11.272442 21.84877
##    no        40 33 15.31818 10.418564 20.21780
##    no        80 33 14.46970  9.979715 18.95968
##   low        20 33 25.48485 20.072443 30.89725
##   low        40 33 24.66667 19.693455 29.63988
##   low        80 33 26.50000 21.268000 31.73200
##  high        20 33 38.86364 32.794406 44.93287
##  high        40 33 38.60606 33.052262 44.15986
##  high        80 33 39.34848 32.800738 45.89623
## 
## 
## Anova
## =====
## 
## Univariate Type III Repeated-Measures ANOVA Assuming Sphericity
## 
##                Sum Sq num Df Error SS den Df  F value    Pr(>F)    
## (Intercept)    210880      1    45936     32 146.9049 1.684e-13 ***
## load            27491      2    13238     64  66.4565 2.404e-16 ***
## frequency          32      2     1894     64   0.5394    0.5857    
## load:frequency    106      4     6146    128   0.5525    0.6975    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## 
## Mauchly Tests for Sphericity
## 
##                Test statistic p-value
## load                  0.49314 0.00002
## frequency             0.94958 0.44848
## load:frequency        0.49458 0.01105
## 
## 
## Greenhouse-Geisser and Huynh-Feldt Corrections
##  for Departure from Sphericity
## 
##                 GG eps Pr(>F[GG])    
## load           0.66363  1.279e-11 ***
## frequency      0.95200     0.5772    
## load:frequency 0.79558     0.6579    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##                   HF eps   Pr(>F[HF])
## load           0.6813812 7.194686e-12
## frequency      1.0106339 5.857432e-01
## load:frequency 0.8936945 6.780188e-01
## 
## 
## BF without vs with interaction
## ==============================
## Bayes factor analysis
## --------------
## [1] load + frequency + fp : 34.90733 ±7.07%
## 
## Against denominator:
##   dv ~ load + frequency + load:frequency + fp 
## ---
## Bayes factor type: BFlinearModel, JZS
Effort
Fres = computeANOVA(2, Dtmp1[[2]], mylvls = c('no','low','high'))

## =====================================================================
##                         Effort
## =====================================================================
## 
## 
## Descriptives
## ============
##  load frequency  N     Mean     CI_LL    CI_UL
##    no        20 33 15.16667  9.666378 20.66696
##    no        40 33 13.27273  8.767643 17.77781
##    no        80 33 13.21212  9.094360 17.32988
##   low        20 33 25.81818 20.090924 31.54544
##   low        40 33 25.83333 19.621037 32.04563
##   low        80 33 29.03030 22.272097 35.78851
##  high        20 33 40.34848 33.873449 46.82352
##  high        40 33 42.16667 36.612530 47.72080
##  high        80 33 41.93939 35.256192 48.62260
## 
## 
## Anova
## =====
## 
## Univariate Type III Repeated-Measures ANOVA Assuming Sphericity
## 
##                Sum Sq num Df Error SS den Df  F value    Pr(>F)    
## (Intercept)    223316      1    47974     32 148.9565 1.402e-13 ***
## load            37751      2    18493     64  65.3255 3.480e-16 ***
## frequency          61      2     3545     64   0.5487    0.5804    
## load:frequency    311      4     6854    128   1.4540    0.2201    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## 
## Mauchly Tests for Sphericity
## 
##                Test statistic p-value
## load                  0.93184 0.33478
## frequency             0.97796 0.70789
## load:frequency        0.86374 0.87918
## 
## 
## Greenhouse-Geisser and Huynh-Feldt Corrections
##  for Departure from Sphericity
## 
##                 GG eps Pr(>F[GG])    
## load           0.93619   2.67e-15 ***
## frequency      0.97843     0.5767    
## load:frequency 0.93361     0.2233    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##                   HF eps   Pr(>F[HF])
## load           0.9922499 4.456419e-16
## frequency      1.0414461 5.803804e-01
## load:frequency 1.0722973 2.200817e-01
## 
## 
## BF without vs with interaction
## ==============================
## Bayes factor analysis
## --------------
## [1] load + frequency + fp : 18.13436 ±2.66%
## 
## Against denominator:
##   dv ~ load + frequency + load:frequency + fp 
## ---
## Bayes factor type: BFlinearModel, JZS

ANOVA summary

Analyze the factorial design (load x frequency) with repeated-measures ANOVA:

load: no, low, high
modulation frequency: 20, 40, 80 Hz

An interaction would suggest that load effects differed among the modulation frequencies.

Summary of interaction analyses:
* Overall_interaction has 4 dfs.
* BF01_interaction is the BF for a model without the overall interaction versus a model with the overall interaction (prior: Cauchy r scale = 0.5).
* BF01_error% estimates the error of the BF in percent. For example, if BF = 10 and the error is 10%, then the BF is estimated to vary between 9 and 11.

Fres[,2:4] = round(Fres[,2:4], digits = 3)
Fres[Fres < 0.001] = 0.001
Fres %>%
  kable(digits = 3) %>%
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"), 
                full_width = F, position = 'left')
Variable Overall_Interaction_p BF01_Interaction BF01_error%
Mental 0.658 34.907 7.075
Effort 0.223 18.134 2.659

ASSR means and prereg BFs

Means and preregistered Bayes factors.

Ampl SmN

Amplitude signal minus noise (SmN)

plot

iv = "AmpSmN"
Dtmp = getdiffs(D, iv = iv)
myylim = c(min(Dtmp), max(Dtmp)) 
Dtmp = Dtmp[,c(10:27)]
Dtmp = cbind(D$fp, Dtmp)
colnames(Dtmp)[1] = 'fp'
Dtmp1 = Dtmp[,c(1,2:7)]
colnames(Dtmp1) = c('fp', 'no', 'low', 'high', 'no-low', 'no-high', 'low-high')
bp1a = plotoverlay(dm = Dtmp1,lbl = paste0("20 Hz"), dvy = "Mean SmN amplitude (µV)", myylim)
Dtmp1 = Dtmp[,c(1,8:13)]
colnames(Dtmp1) = c('fp', 'no', 'low', 'high', 'no-low', 'no-high', 'low-high')
bp1b = plotoverlay(dm = Dtmp1,lbl = paste0("40 Hz"), dvy = "", myylim)
Dtmp1 = Dtmp[,c(1,14:19)]
colnames(Dtmp1) = c('fp', 'no', 'low', 'high', 'no-low', 'no-high', 'low-high')
bp1c = plotoverlay(dm = Dtmp1,lbl = paste0("80 Hz"), dvy = "", myylim)
grid.arrange(bp1a, bp1b, bp1c, ncol = 3)

bp1 = arrangeGrob(bp1a, bp1b, bp1c, ncol = 3)
ggsave(file.path(dir_fig,"figure_amp.jpg"), bp1, dpi = 600, width = 7, height = 4)
ggsave(file.path(dir_fig,"figure_amp.pdf"), bp1, dpi = 600, width = 7, height = 4)
Dtmp_amp = Dtmp # save for later

table

iv = "AmpSmN"
Dtmp = getdiffs(D, iv = iv)
Dtmp = tableCIs(Dtmp[,-c(1:9)])
Dtmp %>%
  kable(digits = 3) %>%
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"), 
                full_width = F, position = 'left')
Variable Mean LL UL N
no20Hz 0.360 0.272 0.447 33
lo20Hz 0.346 0.254 0.437 33
hi20Hz 0.355 0.254 0.455 33
no-lo20Hz 0.014 -0.038 0.066 33
no-hi20Hz 0.005 -0.062 0.072 33
lo-hi20Hz -0.009 -0.060 0.043 33
no40Hz 0.479 0.388 0.571 33
lo40Hz 0.458 0.374 0.542 33
hi40Hz 0.442 0.351 0.532 33
no-lo40Hz 0.021 -0.006 0.049 33
no-hi40Hz 0.038 -0.003 0.078 33
lo-hi40Hz 0.017 -0.017 0.050 33
no80Hz 0.099 0.064 0.133 33
lo80Hz 0.103 0.071 0.135 33
hi80Hz 0.092 0.057 0.128 33
no-lo80Hz -0.004 -0.023 0.015 33
no-hi80Hz 0.006 -0.016 0.028 33
lo-hi80Hz 0.011 -0.012 0.033 33

preregistered BFs

The BFs are computed from Bayesian one-sample t tests of difference scores (with Aladins R script).
https://doi.org/10.17045/sthlmuni.4981154.v3

The BF01 uses uniform H1 models with different lower limits (LL) and upper limits (UL).
BF01 is the evidence for the null hypothesis relative to the alternative hypothesis.
If BF01 > 3, this is evidence for the null. If BF01 < 1/3, this is evidence against the null.

Dtmp = contrastBFs(D, iv = iv)
Dtmp %>%
  kable(digits = 3,
        col.names = c('Variable','Mean','[-1, +1]','[0, +1]','[0, +0.24]','[0, +0.37]')) %>%
  add_header_above(c(" " = 2, "BF01" = 4)) %>%
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"), 
                full_width = F, position = 'left')
BF01
Variable Mean [-1, +1] [0, +1] [0, +0.24] [0, +0.37]
no-lo20Hz 0.014 26.618 18.739 4.529 6.974
no-hi20Hz 0.005 23.783 21.015 5.084 7.827
lo-hi20Hz -0.009 29.386 39.497 9.624 14.798
no-lo40Hz 0.021 17.392 9.249 2.227 3.432
no-hi40Hz 0.038 6.995 3.616 0.869 1.339
lo-hi40Hz 0.016 28.865 17.013 4.109 6.328
no-lo80Hz -0.004 75.729 110.887 27.795 42.530
no-hi80Hz 0.006 61.778 42.256 10.305 15.843
lo-hi80Hz 0.011 44.927 26.853 6.510 10.018

ITC SmN

Intertrial coherence signal minus noise (SmN)

plot

iv = "ItcSmN"
Dtmp = getdiffs(D, iv = iv)
myylim = c(min(Dtmp), max(Dtmp)) 
Dtmp = Dtmp[,c(10:27)]
Dtmp = cbind(D$fp, Dtmp)
colnames(Dtmp)[1] = 'fp'
Dtmp1 = Dtmp[,c(1,2:7)]
colnames(Dtmp1) = c('fp', 'no', 'low', 'high', 'no-low', 'no-high', 'low-high')
bp1a = plotoverlay(dm = Dtmp1,lbl = paste0("20 Hz"), dvy = "Mean SmN ITC", myylim)
Dtmp1 = Dtmp[,c(1,8:13)]
colnames(Dtmp1) = c('fp', 'no', 'low', 'high', 'no-low', 'no-high', 'low-high')
bp1b = plotoverlay(dm = Dtmp1,lbl = paste0("40 Hz"), dvy = "", myylim)
Dtmp1 = Dtmp[,c(1,14:19)]
colnames(Dtmp1) = c('fp', 'no', 'low', 'high', 'no-low', 'no-high', 'low-high')
bp1c = plotoverlay(dm = Dtmp1,lbl = paste0("80 Hz"), dvy = "", myylim)
grid.arrange(bp1a, bp1b, bp1c, ncol = 3)

bp1 = arrangeGrob(bp1a, bp1b, bp1c, ncol = 3)
ggsave(file.path(dir_fig,"figure_itc.jpg"), bp1, dpi = 600, width = 7, height = 4)
ggsave(file.path(dir_fig,"figure_itc.pdf"), bp1, dpi = 600, width = 7, height = 4)
Dtmp_itc = Dtmp # save for later

table

iv = "ItcSmN"
Dtmp = getdiffs(D, iv = iv)
Dtmp = tableCIs(Dtmp[,-c(1:9)])
Dtmp %>%
  kable(digits = 3) %>%
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"), 
                full_width = F, position = 'left')
Variable Mean LL UL N
no20Hz 0.177 0.131 0.223 33
lo20Hz 0.190 0.146 0.234 33
hi20Hz 0.187 0.136 0.238 33
no-lo20Hz -0.013 -0.033 0.008 33
no-hi20Hz -0.010 -0.040 0.020 33
lo-hi20Hz 0.003 -0.023 0.029 33
no40Hz 0.370 0.310 0.431 33
lo40Hz 0.345 0.288 0.403 33
hi40Hz 0.326 0.261 0.390 33
no-lo40Hz 0.025 0.000 0.050 33
no-hi40Hz 0.045 0.017 0.072 33
lo-hi40Hz 0.020 -0.011 0.050 33
no80Hz 0.127 0.085 0.169 33
lo80Hz 0.116 0.076 0.157 33
hi80Hz 0.103 0.067 0.138 33
no-lo80Hz 0.011 -0.010 0.032 33
no-hi80Hz 0.025 -0.001 0.051 33
lo-hi80Hz 0.014 -0.010 0.038 33

preregistered BFs

The BFs are computed from Bayesian one-sample t tests of difference scores (with Aladins R script).
https://doi.org/10.17045/sthlmuni.4981154.v3

The BF01 uses uniform H1 models with different lower limits (LL) and upper limits (UL).
BF01 is the evidence for the null hypothesis relative to the alternative hypothesis.
If BF01 > 3, this is evidence for the null. If BF01 < 1/3, this is evidence against the null.

Dtmp = contrastBFs(D, iv = iv)
Dtmp %>%
  kable(digits = 3,
        col.names = c('Variable','Mean','[-1, +1]','[0, +1]','[0, +0.24]','[0, +0.37]')) %>%
  add_header_above(c(" " = 2, "BF01" = 4)) %>%
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"), 
                full_width = F, position = 'left')
BF01
Variable Mean [-1, +1] [0, +1] [0, +0.24] [0, +0.37]
no-lo20Hz -0.013 34.192 152.465 38.902 59.341
no-hi20Hz -0.010 42.804 82.271 20.388 31.258
lo-hi20Hz 0.003 61.133 50.238 12.291 18.885
no-lo40Hz 0.025 8.614 4.408 1.060 1.633
no-hi40Hz 0.045 0.424 0.212 0.051 0.079
lo-hi40Hz 0.020 22.157 12.197 2.941 4.530
no-lo80Hz 0.011 43.737 25.432 6.162 9.484
no-hi80Hz 0.025 10.113 5.207 1.252 1.929
lo-hi80Hz 0.014 33.898 19.191 4.639 7.143

Floor effects?

Does the combined effect of task and load (i.e., no load minus high load) for SmN depend on the initial SmN value for no load?
A floor effect would be supported if large difference scores of no minus high load (on Y axis) can be observed only for large initial values of no load (on X axis).
In the plots, the regression lines are derived from local polynomial regression fitting, see geom_smooth(method=‘loess’).

Amp SmN

Results suggest no obvious relationship.
Note: 40-Hz shows an increase, but this is driven by two data points.

# amp SmN
Dtmp = Dtmp_amp
tymin = min(Dtmp$'no-hi20Hz',Dtmp$'no-hi40Hz',Dtmp$'no-hi80Hz')
tymax = max(Dtmp$'no-hi20Hz',Dtmp$'no-hi40Hz',Dtmp$'no-hi80Hz')
bp1 = ggplot(Dtmp, aes(x=`no20Hz`, y=`no-hi20Hz`)) +
  theme_bw() + # get rid of background
  geom_point(shape=1, size = 4) +    # Use hollow circles
  labs(title = paste0("20 Hz (N = ",nrow(D),")")) +
  labs(x = "No load SmN") +
  labs(y = "No minus high SmN") +
  geom_hline(yintercept = 0) +
  ylim(tymin,tymax) +
  geom_smooth(method = "loess", formula = y ~ x)
bp2 = ggplot(Dtmp, aes(x=`no40Hz`, y=`no-hi40Hz`)) +
  theme_bw() + # get rid of background
  geom_point(shape=1, size = 4) +    # Use hollow circles
  labs(title = paste0("40 Hz (N = ",nrow(D),")")) +
  labs(x = "No load SmN") +
  labs(y = "No minus high SmN") +
  geom_hline(yintercept = 0) +
  ylim(tymin,tymax) +
  geom_smooth(method = "loess", formula = y ~ x)
bp3 = ggplot(Dtmp, aes(x=`no80Hz`, y=`no-hi80Hz`)) +
  theme_bw() + # get rid of background
  geom_point(shape=1, size = 4) +    # Use hollow circles
  labs(title = paste0("80 Hz (N = ",nrow(D),")")) +
  labs(x = "No load SmN") +
  labs(y = "No minus high SmN") +
  geom_hline(yintercept = 0) +
  ylim(tymin,tymax) +
  geom_smooth(method = "loess", formula = y ~ x)
grid.arrange(bp1, bp2, bp3, ncol = 3)

bp3 = arrangeGrob(bp1, bp2, ncol = 2)
ggsave(file.path(dir_fig,"figure_scatter_amp.jpg"), bp3, dpi = 600, width = 13, height = 4)
ggsave(file.path(dir_fig,"figure_scatter_amp.pdf"), bp3, dpi = 600, width = 13, height = 4)
rm(tymax, tymin, bp1, bp2, bp3)

ITC SmN

Results suggest no obvious relationship.
Note: 80-Hz shows an increase, but this is driven by few data points.

# itc SmN
Dtmp = Dtmp_itc
tymin = min(Dtmp$'no-hi20Hz',Dtmp$'no-hi40Hz',Dtmp$'no-hi80Hz')
tymax = max(Dtmp$'no-hi20Hz',Dtmp$'no-hi40Hz',Dtmp$'no-hi80Hz')
bp1 = ggplot(Dtmp, aes(x=`no20Hz`, y=`no-hi20Hz`)) +
  theme_bw() + # get rid of background
  geom_point(shape=1, size = 4) +    # Use hollow circles
  labs(title = paste0("20 Hz (N = ",nrow(D),")")) +
  labs(x = "No load SmN") +
  labs(y = "No minus high SmN") +
  geom_hline(yintercept = 0) +
  ylim(tymin,tymax) +
  geom_smooth(method = "loess", formula = y ~ x)
bp2 = ggplot(Dtmp, aes(x=`no40Hz`, y=`no-hi40Hz`)) +
  theme_bw() + # get rid of background
  geom_point(shape=1, size = 4) +    # Use hollow circles
  labs(title = paste0("40 Hz (N = ",nrow(D),")")) +
  labs(x = "No load SmN") +
  labs(y = "No minus high SmN") +
  geom_hline(yintercept = 0) +
  ylim(tymin,tymax) +
  geom_smooth(method = "loess", formula = y ~ x)
bp3 = ggplot(Dtmp, aes(x=`no80Hz`, y=`no-hi80Hz`)) +
  theme_bw() + # get rid of background
  geom_point(shape=1, size = 4) +    # Use hollow circles
  labs(title = paste0("80 Hz (N = ",nrow(D),")")) +
  labs(x = "No load SmN") +
  labs(y = "No minus high SmN") +
  geom_hline(yintercept = 0) +
  ylim(tymin,tymax) +
  geom_smooth(method = "loess", formula = y ~ x)
grid.arrange(bp1, bp2, bp3, ncol = 3)

bp3 = arrangeGrob(bp1, bp2, ncol = 2)
ggsave(file.path(dir_fig,"figure_scatter_itc.jpg"), bp3, dpi = 600, width = 13, height = 4)
ggsave(file.path(dir_fig,"figure_scatter_itc.pdf"), bp3, dpi = 600, width = 13, height = 4)
rm(tymax, tymin, bp1, bp2, bp3, Dtmp)

Exploratory BFs

In the preregistered BF analyses, we defined upper limits of the priors on the basis of the mean SmN values for no load in a previous study with 40-Hz ASSRs (Study 2 in Szychowska & Wiens, 2020). Theoretically, the SmN during no load defines an upper limit of how strong the task effect and load effect can be.

Because the visual task in the present study was identical to that in the previous study, we anticipated that we would observe similar mean SmN values during no load for 40-Hz. So, we used our previous data to predict the upper limits for 40 Hz. For simplicity, we used these upper limits also for 20 and 80 Hz. Thus, the original goal was to define realistic upper limits in the BF analyses and to preregister these limits to facilitate confirmatory research (hypothesis testing).

However, the present results showed that the actual SmN during no and low load differed from the preregistered upper limits. To conduct BF analyses that matched our original goal of using reasonable upper limits, we defined the upper limits on the basis of the present data, separately for each measure and frequency.

No minus low/high
One analysis considered no load as the baseline, and the H1 model was defined as a uniform distribution between 0 (as lower limit, LL) and the present mean of no load (as upper limit, UL).

No minus low = task effect
No minus high = combined effect of task and load

Low minus high
The other analysis considered low load as the baseline, and the H1 model was defined as a uniform distribution between 0 (as lower limit, LL) and the present mean of low load (as upper limit, UL).

Low minus high = load effect

In the table, LL and UL refer to the 95% CIs of the means (and not to the LL and UL of the H1 models).

no minus low/high

# create matrix with measure, freq, mean no load, 
# diff noMlo, LL_CI, UL_CI, BF01 noMlo, 
# diff noMhi, LL_CI, UL_CI, BF01 noMhi
DBF01 = numeric()
Dtmp_freq = c(20,40,80)

# amp ----
Dtmp_H1 = subset(Dtmp_amp, 
                 select=c(no20Hz, no40Hz, no80Hz))
Dtmp_noMlo = subset(Dtmp_amp, 
                    select=c('no-lo20Hz', 'no-lo40Hz', 'no-lo80Hz'))
Dtmp_noMhi = subset(Dtmp_amp, 
                    select=c('no-hi20Hz', 'no-hi40Hz', 'no-hi80Hz'))
LL = 0
for (i in 1:3) {
  # define UL as mean of no load
  UL = mean(Dtmp_H1[,i])
  
  # noMlo
  tmp = Dtmp_noMlo[,i]
  # noMhi
  tmp2 = Dtmp_noMhi[,i]
  
  DBF01 = rbind(DBF01, c(Dtmp_freq[i], UL, 
                         mean(tmp),  ci(tmp),  BFfitH1(LL = 0, UL, tmp),
                         mean(tmp2), ci(tmp2), BFfitH1(LL = 0, UL, tmp2)))
}
rm(Dtmp_H1, Dtmp_noMlo, Dtmp_noMhi)

# itc ----
Dtmp_H1 = subset(Dtmp_itc, 
                 select=c(no20Hz, no40Hz, no80Hz))
Dtmp_noMlo = subset(Dtmp_itc, 
                    select=c('no-lo20Hz', 'no-lo40Hz', 'no-lo80Hz'))
Dtmp_noMhi = subset(Dtmp_itc, 
                    select=c('no-hi20Hz', 'no-hi40Hz', 'no-hi80Hz'))
LL = 0
for (i in 1:3) {
  # define UL as mean of no load
  UL = mean(Dtmp_H1[,i])
  
  # noMlo
  tmp = Dtmp_noMlo[,i]
  # noMhi
  tmp2 = Dtmp_noMhi[,i]
  
  DBF01 = rbind(DBF01, c(Dtmp_freq[i], UL, 
                         mean(tmp),  ci(tmp),  BFfitH1(LL = 0, UL, tmp),
                         mean(tmp2), ci(tmp2), BFfitH1(LL = 0, UL, tmp2)))
}
DBF01 = as.data.frame(DBF01)
colnames(DBF01)=c('Freq','M-no',
                  'M-noMlo','LL-noMlo','UL-noMlo','BF01-noMlo',
                  'M-noMhi','LL-noMhi','UL-noMhi','BF01-noMhi')
DBF01$Measure = c('Amp','Amp','Amp','ITC','ITC','ITC')
DBF01 = DBF01[,c(ncol(DBF01),1:ncol(DBF01)-1)]
DBF01 %>%
  kable(digits = 3,
        col.names = c('Measure','Frequency','Mean',
                      'Mean','LL', 'UL', 'BF01',
                      'Mean','LL', 'UL', 'BF01')) %>%
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"),
                full_width = F, position = 'left') %>%
  add_header_above(c(" " = 2, "no" = 1, "no minus low" = 4, "no minus high" = 4))
no
no minus low
no minus high
Measure Frequency Mean Mean LL UL BF01 Mean LL UL BF01
Amp 20 0.360 0.014 -0.038 0.066 6.778 0.005 -0.062 0.072 7.607
Amp 40 0.479 0.021 -0.006 0.049 4.444 0.038 -0.003 0.078 1.735
Amp 80 0.099 -0.004 -0.023 0.015 11.529 0.006 -0.016 0.028 4.252
ITC 20 0.177 -0.013 -0.033 0.008 28.834 -0.010 -0.040 0.020 15.074
ITC 40 0.370 0.025 0.000 0.050 1.635 0.045 0.017 0.072 0.079
ITC 80 0.127 0.011 -0.010 0.032 3.274 0.025 -0.001 0.051 0.665
rm(DBF01, Dtmp_freq, Dtmp_H1, Dtmp_noMlo, Dtmp_noMhi)

low minus high

# create matrix with measure, freq, mean low load, 
# diff loMhi, LL_CI, UL_CI, BF01 looMhi
DBF01 = numeric()
Dtmp_freq = c(20,40,80)

# amp ----
Dtmp_H1 = subset(Dtmp_amp, 
                 select=c(lo20Hz, lo40Hz, lo80Hz))
Dtmp_loMhi = subset(Dtmp_amp, 
                    select=c('lo-hi20Hz', 'lo-hi40Hz', 'lo-hi80Hz'))
LL = 0
for (i in 1:3) {
  # define UL as mean of no load
  UL = mean(Dtmp_H1[,i])
  
  # loMhi
  tmp = Dtmp_loMhi[,i]
  
  DBF01 = rbind(DBF01, c(Dtmp_freq[i], UL, 
                         mean(tmp),  ci(tmp),  BFfitH1(LL = 0, UL, tmp)))
}
rm(Dtmp_H1, Dtmp_loMhi)

# itc ----
Dtmp_H1 = subset(Dtmp_itc, 
                 select=c(lo20Hz, lo40Hz, lo80Hz))
Dtmp_loMhi = subset(Dtmp_itc, 
                    select=c('lo-hi20Hz', 'lo-hi40Hz', 'lo-hi80Hz'))
LL = 0
for (i in 1:3) {
  # define UL as mean of no load
  UL = mean(Dtmp_H1[,i])
  
  # loMhi
  tmp = Dtmp_loMhi[,i]
  
  DBF01 = rbind(DBF01, c(Dtmp_freq[i], UL, 
                         mean(tmp),  ci(tmp),  BFfitH1(LL = 0, UL, tmp)))
}
DBF01 = as.data.frame(DBF01)
colnames(DBF01)=c('Freq','M-no',
                  'M-loMhi','LL-loMhi','UL-loMhi','BF01-loMhi')
DBF01$Measure = c('Amp','Amp','Amp','ITC','ITC','ITC')
DBF01 = DBF01[,c(ncol(DBF01),1:ncol(DBF01)-1)]
DBF01 %>%
  kable(digits = 3,
        col.names = c('Measure','Frequency','Mean',
                      'Mean','LL', 'UL', 'BF01')) %>%
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"),
                full_width = F, position = 'left') %>%
  add_header_above(c(" " = 2, "low" = 1, "low minus high" = 4))
low
low minus high
Measure Frequency Mean Mean LL UL BF01
Amp 20 0.346 -0.009 -0.060 0.043 13.833
Amp 40 0.458 0.017 -0.017 0.050 7.831
Amp 80 0.103 0.011 -0.012 0.033 2.801
ITC 20 0.190 0.003 -0.023 0.029 9.739
ITC 40 0.345 0.020 -0.011 0.050 4.228
ITC 80 0.116 0.014 -0.010 0.038 2.254
rm(DBF01, Dtmp_freq, Dtmp_H1, Dtmp_loMhi)

40-Hz: combine with previous data

Our previous study (Szychowska & Wiens, 2020) studied effects of task and load on 40-Hz ASSRs.

Exp. 1: Experiment 1 (N = 43) in Szychowska & Wiens (2020). This study included low and high load.

Exp. 2: Experiment 2 (N = 45) in Szychowska & Wiens (2020). This study included no, low, high, and very high load. Because results showed that performance was impaired more strongly during high load than very high load, high load was used below (and very high load was excluded).

Below, we combined the previous data (Exp. 1 and 2) with the present data to obtain an estimate on the basis of all of our data on 40-Hz ASSRs.

Dtmpa = subset(Dtmp_amp, 
               select=c(fp, no40Hz, lo40Hz, hi40Hz))
colnames(Dtmpa) = c('fp', 'AmpSmNno', 'AmpSmNlo', 'AmpSmNhi')
Dtmpi = subset(Dtmp_itc, 
               select=c(no40Hz, lo40Hz, hi40Hz))
colnames(Dtmpi) = c('ItcSmNno', 'ItcSmNlo', 'ItcSmNhi')
Dtmp = cbind(Dtmpa, Dtmpi)
Dtmp$study = 'present'

DS1=read.csv(file.path(dir_res,"data_export_SmN_ASSR_study1_all_subjects.tsv"), sep="\t",header=TRUE)
DS2=read.csv(file.path(dir_res,"data_export_SmN_ASSR_study2.tsv"), sep="\t",header=TRUE)

no minus low/high

No load is used as the upper limit of the H1 model.
H1 model:
LL = 0
UL = no load
Note that Exp. 1 is excluded because no load was not administered.

No minus low = task effect
No minus high = combined effect of task and load

In the table, LL and UL refer to the 95% CIs of the means (and not to the LL and UL of the H1 models).

# compare noMlo and noMhi

Dall = merge(Dtmp, DS2, all = T)

DBF01 = numeric()

# create matrix with measure, study, n, mean no load, 
# diff noMlo, LL 95%CI, UL 95%CI, BF01 noMlo,
# diff noMhi, LL 95%CI, UL 95%CI, BF01 noMhi
LL = 0

# amp
# study 2
UL = mean(DS2$AmpSmNno)
tmp = DS2$AmpSmNno-DS2$AmpSmNlo
tmp2 = DS2$AmpSmNno-DS2$AmpSmNhi
DBF01 = rbind(DBF01, c('Amp','Exp. 2', nrow(DS2), UL, 
                       mean(tmp), ci(tmp), BFfitH1(LL = 0, UL, tmp),
                       mean(tmp2), ci(tmp2), BFfitH1(LL = 0, UL, tmp2)))
# present study
UL = mean(Dtmp$AmpSmNno)
tmp = Dtmp$AmpSmNno-Dtmp$AmpSmNlo
tmp2 = Dtmp$AmpSmNno-Dtmp$AmpSmNhi
DBF01 = rbind(DBF01, c('Amp','Present', nrow(Dtmp), UL, 
                       mean(tmp), ci(tmp), BFfitH1(LL = 0, UL, tmp),
                       mean(tmp2), ci(tmp2), BFfitH1(LL = 0, UL, tmp2)))
# combined
UL = mean(Dall$AmpSmNno)
tmp = Dall$AmpSmNno-Dall$AmpSmNlo
tmp2 = Dall$AmpSmNno-Dall$AmpSmNhi
DBF01 = rbind(DBF01, c('Amp','Combined', nrow(Dall), UL, 
                       mean(tmp), ci(tmp), BFfitH1(LL = 0, UL, tmp),
                       mean(tmp2), ci(tmp2), BFfitH1(LL = 0, UL, tmp2)))

# itc
# study 2
UL = mean(DS2$ItcSmNno)
tmp = DS2$ItcSmNno-DS2$ItcSmNlo
tmp2 = DS2$ItcSmNno-DS2$ItcSmNhi
DBF01 = rbind(DBF01, c('ITC','Exp. 2', nrow(DS2), UL, 
                       mean(tmp), ci(tmp), BFfitH1(LL = 0, UL, tmp),
                       mean(tmp2), ci(tmp2), BFfitH1(LL = 0, UL, tmp2)))
# present study
UL = mean(Dtmp$ItcSmNno)
tmp = Dtmp$ItcSmNno-Dtmp$ItcSmNlo
tmp2 = Dtmp$ItcSmNno-Dtmp$ItcSmNhi
DBF01 = rbind(DBF01, c('ITC','Present', nrow(Dtmp), UL, 
                       mean(tmp), ci(tmp), BFfitH1(LL = 0, UL, tmp),
                       mean(tmp2), ci(tmp2), BFfitH1(LL = 0, UL, tmp2)))
# combined
UL = mean(Dall$ItcSmNno)
tmp = Dall$ItcSmNno-Dall$ItcSmNlo
tmp2 = Dall$ItcSmNno-Dall$ItcSmNhi
DBF01 = rbind(DBF01, c('ITC','Combined', nrow(Dall), UL, 
                       mean(tmp), ci(tmp), BFfitH1(LL = 0, UL, tmp),
                       mean(tmp2), ci(tmp2), BFfitH1(LL = 0, UL, tmp2)))
DBF01 = as.data.frame(DBF01)
colnames(DBF01)=c('Measure','Study','N','Mno',
                  'M-noMlo','LL-noMlo','UL-noMlo','BF01-noMlo',
                  'M-noMhi','LL-noMhi','UL-noMhi','BF01-noMhi')
# convert character to numeric
i = 3:12
DBF01[, i] = apply(DBF01[,i],2, function(x) as.numeric(as.character(x)))
DBF01 %>%
  kable(digits = 3,
        col.names = c('Measure','Study','N','Mean',
                      'Mean','LL', 'UL', 'BF01',
                      'Mean','LL', 'UL', 'BF01')) %>%
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"),
                full_width = F, position = 'left') %>%
  add_header_above(c(" " = 3, "no" = 1, "no minus low" = 4, "no minus high" = 4)) %>%
  row_spec(c(3,6), bold = T)
no
no minus low
no minus high
Measure Study N Mean Mean LL UL BF01 Mean LL UL BF01
Amp Exp. 2 45 0.243 -0.001 -0.012 0.010 39.213 0.000 -0.013 0.012 32.045
Amp Present 33 0.479 0.021 -0.006 0.049 4.444 0.038 -0.003 0.078 1.735
Amp Combined 78 0.343 0.008 -0.005 0.022 10.065 0.016 -0.003 0.034 3.785
ITC Exp. 2 45 0.368 -0.004 -0.021 0.012 51.978 0.005 -0.015 0.024 19.749
ITC Present 33 0.370 0.025 0.000 0.050 1.635 0.045 0.017 0.072 0.079
ITC Combined 78 0.369 0.008 -0.006 0.022 12.382 0.022 0.005 0.038 0.639

low minus high

Low load is used as the upper limit of the H1 model.
H1 model:
LL = 0
UL = low load

Low minus high = load effect

In the table, LL and UL refer to the 95% CIs of the means (and not to the LL and UL of the H1 models).

# compare low with high load
Dall = merge(Dtmp, DS1, all = T)
Dall = merge(Dall, DS2, all = T)

DBF01 = numeric()

# create matrix with measure, study, n, mean low load, 
# diff loMhi, LL 95%CI, UL 95%CI, BF01 loMhi
LL = 0

# amp
# study 1
UL = mean(DS1$AmpSmNlo)
tmp = DS1$AmpSmNlo-DS1$AmpSmNhi
DBF01 = rbind(DBF01, c('Amp','Exp. 1', nrow(DS1), UL, mean(tmp), ci(tmp), BFfitH1(LL = 0, UL, tmp)))
# study 2
UL = mean(DS2$AmpSmNlo)
tmp = DS2$AmpSmNlo-DS2$AmpSmNhi
DBF01 = rbind(DBF01, c('Amp','Exp. 2', nrow(DS2), UL, mean(tmp), ci(tmp), BFfitH1(LL = 0, UL, tmp)))
# present study
UL = mean(Dtmp$AmpSmNlo)
tmp = Dtmp$AmpSmNlo-Dtmp$AmpSmNhi
DBF01 = rbind(DBF01, c('Amp','Present', nrow(Dtmp), UL, mean(tmp), ci(tmp), BFfitH1(LL = 0, UL, tmp)))
# combined
UL = mean(Dall$AmpSmNlo)
tmp = Dall$AmpSmNlo-Dall$AmpSmNhi
DBF01 = rbind(DBF01, c('Amp','Combined', nrow(Dall), UL, mean(tmp), ci(tmp), BFfitH1(LL = 0, UL, tmp)))

# itc
# study 1
UL = mean(DS1$ItcSmNlo)
tmp = DS1$ItcSmNlo-DS1$ItcSmNhi
DBF01 = rbind(DBF01, c('ITC','Exp. 1', nrow(DS1), UL, mean(tmp), ci(tmp), BFfitH1(LL = 0, UL, tmp)))
# study 2
UL = mean(DS2$ItcSmNlo)
tmp = DS2$ItcSmNlo-DS2$ItcSmNhi
DBF01 = rbind(DBF01, c('ITC','Exp. 2', nrow(DS2), UL, mean(tmp), ci(tmp), BFfitH1(LL = 0, UL, tmp)))
# present study
UL = mean(Dtmp$ItcSmNlo)
tmp = Dtmp$ItcSmNlo-Dtmp$ItcSmNhi
DBF01 = rbind(DBF01, c('ITC','Present', nrow(Dtmp), UL, mean(tmp), ci(tmp), BFfitH1(LL = 0, UL, tmp)))
# combined
UL = mean(Dall$ItcSmNlo)
tmp = Dall$ItcSmNlo-Dall$ItcSmNhi
DBF01 = rbind(DBF01, c('ITC','Combined', nrow(Dall), UL, mean(tmp), ci(tmp), BFfitH1(LL = 0, UL, tmp)))
DBF01 = as.data.frame(DBF01)
colnames(DBF01)=c('Measure','Study','N','Mean','Mean','LL-95%CI', 'UL-95%CI', 'BF01')
# convert character to numeric
i = 3:8
DBF01[, i] = apply(DBF01[,i],2, function(x) as.numeric(as.character(x)))
DBF01 %>%
  kable(digits = 3,
        col.names = c('Measure','Study','N','Mean','Mean','LL', 'UL', 'BF01')) %>%
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"),
                full_width = F, position = 'left') %>%
  add_header_above(c(" " = 3, "low" = 1, "low minus high" = 4)) %>%
  row_spec(c(4,8), bold = T)
low
low minus high
Measure Study N Mean Mean LL UL BF01
Amp Exp. 1 43 0.191 0.006 -0.004 0.017 7.760
Amp Exp. 2 45 0.244 0.000 -0.012 0.013 28.960
Amp Present 33 0.458 0.017 -0.017 0.050 7.831
Amp Combined 121 0.283 0.007 -0.004 0.018 10.069
ITC Exp. 1 43 0.309 0.019 0.000 0.038 1.924
ITC Exp. 2 45 0.373 0.009 -0.009 0.027 11.840
ITC Present 33 0.345 0.020 -0.011 0.050 4.228
ITC Combined 121 0.343 0.015 0.003 0.028 1.091