1 Read in the data

Note: data need to be in the same folder as the analysis script. Otherwise, the path needs to be specified.

library(readr)
tdata <- read_delim("data.txt", 
    delim = "\t", escape_double = FALSE, 
    trim_ws = TRUE)
## Rows: 780 Columns: 12
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: "\t"
## chr (7): subj_code, desktop_conf, attent_conf, Cond_sum, explanation, gender...
## dbl (5): condition, instr_tests, Rating_CC, Rating_SE, age
## 
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.

2 Demographics

Subject demographics:

# demographics 

min(tdata$age) # minimum age 
## [1] 18
max(tdata$age) # maximum age
## [1] 75
mean(tdata$age) # mean age
## [1] 37.94231
sd(tdata$age) # standard deviation of age
## [1] 12.73167
table(tdata$gender) 
## 
##              1: male            2: female        3: non-binary 
##                  388                  378                   11 
## 4: prefer not to say 
##                    3

3 Analyses

First prepare the data set:

  • Factorize
  • reshape into long format (for graphs)
  • divide dv ratings by 10 to limit ratings to a range between 0 and 1 (this is how we scale the y-axis for the graphs)

3.1 Graphs

Ratings in all conditions:

## Warning: `guides(<scale> = FALSE)` is deprecated. Please use `guides(<scale> =
## "none")` instead.
## Warning: `fun.y` is deprecated. Use `fun` instead.
## `fun.y` is deprecated. Use `fun` instead.
## `fun.y` is deprecated. Use `fun` instead.

Now seperately for the binary and continuous variables conditions.

Binary:

binary <- subset(tdata_long, Cond_sum == "binary-radial" | Cond_sum == "binary-channel") # subset

continuous <- subset(tdata_long, Cond_sum != "binary-radial" & Cond_sum != "binary-channel") # subset
## Warning: `guides(<scale> = FALSE)` is deprecated. Please use `guides(<scale> =
## "none")` instead.
## Warning: `fun.y` is deprecated. Use `fun` instead.
## `fun.y` is deprecated. Use `fun` instead.
## `fun.y` is deprecated. Use `fun` instead.

Continuous:

## Warning: `guides(<scale> = FALSE)` is deprecated. Please use `guides(<scale> =
## "none")` instead.
## Warning: `fun.y` is deprecated. Use `fun` instead.
## `fun.y` is deprecated. Use `fun` instead.
## `fun.y` is deprecated. Use `fun` instead.

3.2 Appending of additional factors

The original data set as a “combined” column that codes the different factor combinations. We here append columns to the data frame that seperate the different factors:

  • Transmission type: channel vs. radial
  • Level of energy: unlimited vs. limited (this only exist in the continuous variables conditions)
continuous$transmission[continuous$Cond_sum == "cont.-channel-unlimited" | continuous$Cond_sum == "cont.-channel-limited"] <- "channel" 
## Warning: Unknown or uninitialised column: `transmission`.
continuous$transmission[continuous$Cond_sum == "cont.-radial-unlimited" | continuous$Cond_sum == "cont.-radial-limited"] <- "radial"

continuous$energy[continuous$Cond_sum == "cont.-channel-unlimited" | continuous$Cond_sum == "cont.-radial-unlimited"] <- "unlimited"
## Warning: Unknown or uninitialised column: `energy`.
continuous$energy[continuous$Cond_sum == "cont.-channel-limited" | continuous$Cond_sum == "cont.-radial-limited"] <- "specific"
continuous$var_type <- "continuous"

type of transmission also in the case of binary variables:

binary$transmission[binary$Cond_sum == "binary-channel"] <- "channel"
## Warning: Unknown or uninitialised column: `transmission`.
binary$transmission[binary$Cond_sum == "binary-radial"] <- "radial"
binary$var_type <- "binary"

3.3 Descriptive Stats

## : Rating_SE
## : channel
## : specific
##       median         mean      SE.mean CI.mean.0.95          var      std.dev 
##   0.90000000   0.82230769   0.02104218   0.04163247   0.05756052   0.23991775 
##     coef.var 
##   0.29176152 
## ------------------------------------------------------------ 
## : Rating_CC
## : channel
## : specific
##       median         mean      SE.mean CI.mean.0.95          var      std.dev 
##   0.30000000   0.41846154   0.02048269   0.04052549   0.05454025   0.23353854 
##     coef.var 
##   0.55808843 
## ------------------------------------------------------------ 
## : Rating_SE
## : radial
## : specific
##       median         mean      SE.mean CI.mean.0.95          var      std.dev 
##   0.70000000   0.63846154   0.02744072   0.05429213   0.09788909   0.31287232 
##     coef.var 
##   0.49004098 
## ------------------------------------------------------------ 
## : Rating_CC
## : radial
## : specific
##       median         mean      SE.mean CI.mean.0.95          var      std.dev 
##   0.50000000   0.47461538   0.02294146   0.04539025   0.06842039   0.26157292 
##     coef.var 
##   0.55112609 
## ------------------------------------------------------------ 
## : Rating_SE
## : channel
## : unlimited
##       median         mean      SE.mean CI.mean.0.95          var      std.dev 
##   0.90000000   0.82230769   0.01999599   0.03956255   0.05197913   0.22798932 
##     coef.var 
##   0.27725549 
## ------------------------------------------------------------ 
## : Rating_CC
## : channel
## : unlimited
##       median         mean      SE.mean CI.mean.0.95          var      std.dev 
##   0.60000000   0.57923077   0.02406749   0.04761812   0.07530173   0.27441161 
##     coef.var 
##   0.47375178 
## ------------------------------------------------------------ 
## : Rating_SE
## : radial
## : unlimited
##       median         mean      SE.mean CI.mean.0.95          var      std.dev 
##   0.80000000   0.69923077   0.02438256   0.04824150   0.07728623   0.27800400 
##     coef.var 
##   0.39758548 
## ------------------------------------------------------------ 
## : Rating_CC
## : radial
## : unlimited
##       median         mean      SE.mean CI.mean.0.95          var      std.dev 
##   0.50000000   0.59461538   0.02365806   0.04680805   0.07276148   0.26974336 
##     coef.var 
##   0.45364342
by(binary$value, list(binary$variable, binary$transmission), stat.desc , basic = FALSE)
## : Rating_SE
## : channel
##       median         mean      SE.mean CI.mean.0.95          var      std.dev 
##   1.00000000   0.84076923   0.02153047   0.04259857   0.06026297   0.24548517 
##     coef.var 
##   0.29197687 
## ------------------------------------------------------------ 
## : Rating_CC
## : channel
##       median         mean      SE.mean CI.mean.0.95          var      std.dev 
##   0.95000000   0.76923077   0.02511384   0.04968835   0.08199165   0.28634184 
##     coef.var 
##   0.37224440 
## ------------------------------------------------------------ 
## : Rating_SE
## : radial
##       median         mean      SE.mean CI.mean.0.95          var      std.dev 
##   0.80000000   0.76538462   0.02177873   0.04308975   0.06166070   0.24831573 
##     coef.var 
##   0.32443262 
## ------------------------------------------------------------ 
## : Rating_CC
## : radial
##       median         mean      SE.mean CI.mean.0.95          var      std.dev 
##   0.80000000   0.70846154   0.02437127   0.04821916   0.07721467   0.27787528 
##     coef.var 
##   0.39222352

3.4 Fitting statistical models

library(afex)
## ************
## Welcome to afex. For support visit: http://afex.singmann.science/
## - Functions for ANOVAs: aov_car(), aov_ez(), and aov_4()
## - Methods for calculating p-values with mixed(): 'S', 'KR', 'LRT', and 'PB'
## - 'afex_aov' and 'mixed' objects can be passed to emmeans() for follow-up tests
## - NEWS: emmeans() for ANOVA models now uses model = 'multivariate' as default.
## - Get and set global package options with: afex_options()
## - Set orthogonal sum-to-zero contrasts globally: set_sum_contrasts()
## - For example analyses see: browseVignettes("afex")
## ************
## 
## Attache Paket: 'afex'
## Das folgende Objekt ist maskiert 'package:lme4':
## 
##     lmer
library(emmeans)
#citation("afex")

For binary variables case:

a_bin <- aov_car(value ~ variable*transmission + Error(subj_code/(variable)), binary)
## Converting to factor: transmission
## Contrasts set to contr.sum for the following variables: transmission
a_bin
## Anova Table (Type 3 tests)
## 
## Response: value
##                  Effect     df  MSE         F   ges p.value
## 1          transmission 1, 258 0.10    5.97 *  .016    .015
## 2              variable 1, 258 0.04 13.51 ***  .015   <.001
## 3 transmission:variable 1, 258 0.04      0.17 <.001    .676
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
knitr::kable(nice(a_bin))
Effect df MSE F ges p.value
transmission 1, 258 0.10 5.97 * .016 .015
variable 1, 258 0.04 13.51 *** .015 <.001
transmission:variable 1, 258 0.04 0.17 <.001 .676

Follow-up of ANOVA for binary variables cases:

Main effect of transmission type

MainE_transmission<-emmeans(a_bin, ~transmission)
MainE_transmission
##  transmission emmean     SE  df lower.CL upper.CL
##  channel       0.805 0.0197 258    0.766    0.844
##  radial        0.737 0.0197 258    0.698    0.776
## 
## Results are averaged over the levels of: variable 
## Confidence level used: 0.95
confint(pairs(MainE_transmission), level = 0.95)
##  contrast         estimate     SE  df lower.CL upper.CL
##  channel - radial   0.0681 0.0279 258   0.0132    0.123
## 
## Results are averaged over the levels of: variable 
## Confidence level used: 0.95

Main effect of variable type (the type of cause)

MainE_cause<-emmeans(a_bin, ~variable)
MainE_cause
##  variable  emmean     SE  df lower.CL upper.CL
##  Rating_SE  0.803 0.0153 258    0.773    0.833
##  Rating_CC  0.739 0.0175 258    0.704    0.773
## 
## Results are averaged over the levels of: transmission 
## Confidence level used: 0.95
pairs(MainE_cause, level = 0.95)
##  contrast              estimate     SE  df t.ratio p.value
##  Rating_SE - Rating_CC   0.0642 0.0175 258   3.676  0.0003
## 
## Results are averaged over the levels of: transmission

For continuous variables case:

a_cont <- aov_car(value ~ variable*transmission*energy + Error(subj_code/(variable)), continuous)
## Converting to factor: transmission, energy
## Contrasts set to contr.sum for the following variables: transmission, energy
a_cont
## Anova Table (Type 3 tests)
## 
## Response: value
##                         Effect     df  MSE          F   ges p.value
## 1                 transmission 1, 516 0.07  12.93 ***  .012   <.001
## 2                       energy 1, 516 0.07  27.22 ***  .026   <.001
## 3          transmission:energy 1, 516 0.07       0.09 <.001    .760
## 4                     variable 1, 516 0.07 196.47 ***  .160   <.001
## 5        transmission:variable 1, 516 0.07  33.58 ***  .031   <.001
## 6              energy:variable 1, 516 0.07  11.35 ***  .011   <.001
## 7 transmission:energy:variable 1, 516 0.07       2.42  .002    .121
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
knitr::kable(nice(a_cont))
Effect df MSE F ges p.value
transmission 1, 516 0.07 12.93 *** .012 <.001
energy 1, 516 0.07 27.22 *** .026 <.001
transmission:energy 1, 516 0.07 0.09 <.001 .760
variable 1, 516 0.07 196.47 *** .160 <.001
transmission:variable 1, 516 0.07 33.58 *** .031 <.001
energy:variable 1, 516 0.07 11.35 *** .011 <.001
transmission:energy:variable 1, 516 0.07 2.42 .002 .121

Main effect of transmission type (radial vs. channel):

MainE_trans<-emmeans(a_cont, ~transmission)
## NOTE: Results may be misleading due to involvement in interactions
MainE_trans
##  transmission emmean     SE  df lower.CL upper.CL
##  channel       0.661 0.0116 516    0.638    0.683
##  radial        0.602 0.0116 516    0.579    0.624
## 
## Results are averaged over the levels of: energy, variable 
## Confidence level used: 0.95
confint(pairs(MainE_trans, level = 0.95))
##  contrast         estimate     SE  df lower.CL upper.CL
##  channel - radial   0.0588 0.0164 516   0.0267    0.091
## 
## Results are averaged over the levels of: energy, variable 
## Confidence level used: 0.95

Main effect of energy level (unlimited vs. limited):

MainE_en<-emmeans(a_cont, ~energy)
## NOTE: Results may be misleading due to involvement in interactions
MainE_en
##  energy    emmean     SE  df lower.CL upper.CL
##  specific   0.588 0.0116 516    0.566    0.611
##  unlimited  0.674 0.0116 516    0.651    0.697
## 
## Results are averaged over the levels of: transmission, variable 
## Confidence level used: 0.95
confint(pairs(MainE_en, level = 0.95))
##  contrast             estimate     SE  df lower.CL upper.CL
##  specific - unlimited  -0.0854 0.0164 516   -0.118  -0.0532
## 
## Results are averaged over the levels of: transmission, variable 
## Confidence level used: 0.95

Get means in the different conditions:

a1 <- a_cont
ls1 <- lsmeans(a1, c("variable","transmission","energy")) 
ls1
##  variable  transmission energy    lsmean     SE  df lower.CL upper.CL
##  Rating_SE channel      specific   0.822 0.0234 516    0.776    0.868
##  Rating_CC channel      specific   0.418 0.0228 516    0.374    0.463
##  Rating_SE radial       specific   0.638 0.0234 516    0.592    0.684
##  Rating_CC radial       specific   0.475 0.0228 516    0.430    0.519
##  Rating_SE channel      unlimited  0.822 0.0234 516    0.776    0.868
##  Rating_CC channel      unlimited  0.579 0.0228 516    0.534    0.624
##  Rating_SE radial       unlimited  0.699 0.0234 516    0.653    0.745
##  Rating_CC radial       unlimited  0.595 0.0228 516    0.550    0.639
## 
## Confidence level used: 0.95
ls2 <- lsmeans(a1, c("variable","transmission")) # joint evaluation (basically gives the same table)
ls2
##  variable  transmission lsmean     SE  df lower.CL upper.CL
##  Rating_SE channel       0.822 0.0165 516    0.790    0.855
##  Rating_CC channel       0.499 0.0161 516    0.467    0.531
##  Rating_SE radial        0.669 0.0165 516    0.636    0.701
##  Rating_CC radial        0.535 0.0161 516    0.503    0.566
## 
## Results are averaged over the levels of: energy 
## Confidence level used: 0.95
ls3 <- lsmeans(a1, c("variable","energy")) # joint evaluation (basically gives the same table)
ls3
##  variable  energy    lsmean     SE  df lower.CL upper.CL
##  Rating_SE specific   0.730 0.0165 516    0.698    0.763
##  Rating_CC specific   0.447 0.0161 516    0.415    0.478
##  Rating_SE unlimited  0.761 0.0165 516    0.728    0.793
##  Rating_CC unlimited  0.587 0.0161 516    0.555    0.619
## 
## Results are averaged over the levels of: transmission 
## Confidence level used: 0.95

Again for all 12 means that we obtained:

# same ANOVA as before
lmeModel <- lmer(value ~ variable*Cond_sum + (1|subj_code), data=tdata_long)


lmeModel <- aov_car(value ~ variable*Cond_sum + Error(subj_code/(variable)), tdata_long)
## Contrasts set to contr.sum for the following variables: Cond_sum
# follow-up analysis 

ls1 <- lsmeans(lmeModel, c("Cond_sum","variable")) # joint evaluation (basically gives the same table)
ls1
##  Cond_sum                variable  lsmean     SE  df lower.CL upper.CL
##  binary-radial           Rating_SE  0.765 0.0228 774    0.721    0.810
##  binary-channel          Rating_SE  0.841 0.0228 774    0.796    0.886
##  cont.-radial-unlimited  Rating_SE  0.699 0.0228 774    0.654    0.744
##  cont.-radial-limited    Rating_SE  0.638 0.0228 774    0.594    0.683
##  cont.-channel-unlimited Rating_SE  0.822 0.0228 774    0.777    0.867
##  cont.-channel-limited   Rating_SE  0.822 0.0228 774    0.777    0.867
##  binary-radial           Rating_CC  0.708 0.0235 774    0.662    0.755
##  binary-channel          Rating_CC  0.769 0.0235 774    0.723    0.815
##  cont.-radial-unlimited  Rating_CC  0.595 0.0235 774    0.549    0.641
##  cont.-radial-limited    Rating_CC  0.475 0.0235 774    0.429    0.521
##  cont.-channel-unlimited Rating_CC  0.579 0.0235 774    0.533    0.625
##  cont.-channel-limited   Rating_CC  0.418 0.0235 774    0.372    0.465
## 
## Confidence level used: 0.95

Get all differences (later the relevant subset will be extracted):

t <- pairs(ls1) # compares rating differences


t <- confint(t, level = 0.95) # get the CIs of the differences
t
##  contrast                                                                 
##  (binary-radial Rating_SE) - (binary-channel Rating_SE)                   
##  (binary-radial Rating_SE) - (cont.-radial-unlimited Rating_SE)           
##  (binary-radial Rating_SE) - (cont.-radial-limited Rating_SE)             
##  (binary-radial Rating_SE) - (cont.-channel-unlimited Rating_SE)          
##  (binary-radial Rating_SE) - (cont.-channel-limited Rating_SE)            
##  (binary-radial Rating_SE) - (binary-radial Rating_CC)                    
##  (binary-radial Rating_SE) - (binary-channel Rating_CC)                   
##  (binary-radial Rating_SE) - (cont.-radial-unlimited Rating_CC)           
##  (binary-radial Rating_SE) - (cont.-radial-limited Rating_CC)             
##  (binary-radial Rating_SE) - (cont.-channel-unlimited Rating_CC)          
##  (binary-radial Rating_SE) - (cont.-channel-limited Rating_CC)            
##  (binary-channel Rating_SE) - (cont.-radial-unlimited Rating_SE)          
##  (binary-channel Rating_SE) - (cont.-radial-limited Rating_SE)            
##  (binary-channel Rating_SE) - (cont.-channel-unlimited Rating_SE)         
##  (binary-channel Rating_SE) - (cont.-channel-limited Rating_SE)           
##  (binary-channel Rating_SE) - (binary-radial Rating_CC)                   
##  (binary-channel Rating_SE) - (binary-channel Rating_CC)                  
##  (binary-channel Rating_SE) - (cont.-radial-unlimited Rating_CC)          
##  (binary-channel Rating_SE) - (cont.-radial-limited Rating_CC)            
##  (binary-channel Rating_SE) - (cont.-channel-unlimited Rating_CC)         
##  (binary-channel Rating_SE) - (cont.-channel-limited Rating_CC)           
##  (cont.-radial-unlimited Rating_SE) - (cont.-radial-limited Rating_SE)    
##  (cont.-radial-unlimited Rating_SE) - (cont.-channel-unlimited Rating_SE) 
##  (cont.-radial-unlimited Rating_SE) - (cont.-channel-limited Rating_SE)   
##  (cont.-radial-unlimited Rating_SE) - (binary-radial Rating_CC)           
##  (cont.-radial-unlimited Rating_SE) - (binary-channel Rating_CC)          
##  (cont.-radial-unlimited Rating_SE) - (cont.-radial-unlimited Rating_CC)  
##  (cont.-radial-unlimited Rating_SE) - (cont.-radial-limited Rating_CC)    
##  (cont.-radial-unlimited Rating_SE) - (cont.-channel-unlimited Rating_CC) 
##  (cont.-radial-unlimited Rating_SE) - (cont.-channel-limited Rating_CC)   
##  (cont.-radial-limited Rating_SE) - (cont.-channel-unlimited Rating_SE)   
##  (cont.-radial-limited Rating_SE) - (cont.-channel-limited Rating_SE)     
##  (cont.-radial-limited Rating_SE) - (binary-radial Rating_CC)             
##  (cont.-radial-limited Rating_SE) - (binary-channel Rating_CC)            
##  (cont.-radial-limited Rating_SE) - (cont.-radial-unlimited Rating_CC)    
##  (cont.-radial-limited Rating_SE) - (cont.-radial-limited Rating_CC)      
##  (cont.-radial-limited Rating_SE) - (cont.-channel-unlimited Rating_CC)   
##  (cont.-radial-limited Rating_SE) - (cont.-channel-limited Rating_CC)     
##  (cont.-channel-unlimited Rating_SE) - (cont.-channel-limited Rating_SE)  
##  (cont.-channel-unlimited Rating_SE) - (binary-radial Rating_CC)          
##  (cont.-channel-unlimited Rating_SE) - (binary-channel Rating_CC)         
##  (cont.-channel-unlimited Rating_SE) - (cont.-radial-unlimited Rating_CC) 
##  (cont.-channel-unlimited Rating_SE) - (cont.-radial-limited Rating_CC)   
##  (cont.-channel-unlimited Rating_SE) - (cont.-channel-unlimited Rating_CC)
##  (cont.-channel-unlimited Rating_SE) - (cont.-channel-limited Rating_CC)  
##  (cont.-channel-limited Rating_SE) - (binary-radial Rating_CC)            
##  (cont.-channel-limited Rating_SE) - (binary-channel Rating_CC)           
##  (cont.-channel-limited Rating_SE) - (cont.-radial-unlimited Rating_CC)   
##  (cont.-channel-limited Rating_SE) - (cont.-radial-limited Rating_CC)     
##  (cont.-channel-limited Rating_SE) - (cont.-channel-unlimited Rating_CC)  
##  (cont.-channel-limited Rating_SE) - (cont.-channel-limited Rating_CC)    
##  (binary-radial Rating_CC) - (binary-channel Rating_CC)                   
##  (binary-radial Rating_CC) - (cont.-radial-unlimited Rating_CC)           
##  (binary-radial Rating_CC) - (cont.-radial-limited Rating_CC)             
##  (binary-radial Rating_CC) - (cont.-channel-unlimited Rating_CC)          
##  (binary-radial Rating_CC) - (cont.-channel-limited Rating_CC)            
##  (binary-channel Rating_CC) - (cont.-radial-unlimited Rating_CC)          
##  (binary-channel Rating_CC) - (cont.-radial-limited Rating_CC)            
##  (binary-channel Rating_CC) - (cont.-channel-unlimited Rating_CC)         
##  (binary-channel Rating_CC) - (cont.-channel-limited Rating_CC)           
##  (cont.-radial-unlimited Rating_CC) - (cont.-radial-limited Rating_CC)    
##  (cont.-radial-unlimited Rating_CC) - (cont.-channel-unlimited Rating_CC) 
##  (cont.-radial-unlimited Rating_CC) - (cont.-channel-limited Rating_CC)   
##  (cont.-radial-limited Rating_CC) - (cont.-channel-unlimited Rating_CC)   
##  (cont.-radial-limited Rating_CC) - (cont.-channel-limited Rating_CC)     
##  (cont.-channel-unlimited Rating_CC) - (cont.-channel-limited Rating_CC)  
##  estimate     SE  df lower.CL upper.CL
##  -0.07538 0.0323 774 -0.18124  0.03047
##   0.06615 0.0323 774 -0.03970  0.17200
##   0.12692 0.0323 774  0.02107  0.23277
##  -0.05692 0.0323 774 -0.16277  0.04893
##  -0.05692 0.0323 774 -0.16277  0.04893
##   0.05692 0.0302 774 -0.04220  0.15605
##  -0.00385 0.0328 774 -0.11122  0.10353
##   0.17077 0.0328 774  0.06339  0.27814
##   0.29077 0.0328 774  0.18339  0.39814
##   0.18615 0.0328 774  0.07878  0.29353
##   0.34692 0.0328 774  0.23955  0.45430
##   0.14154 0.0323 774  0.03569  0.24739
##   0.20231 0.0323 774  0.09646  0.30816
##   0.01846 0.0323 774 -0.08739  0.12431
##   0.01846 0.0323 774 -0.08739  0.12431
##   0.13231 0.0328 774  0.02493  0.23968
##   0.07154 0.0302 774 -0.02759  0.17067
##   0.24615 0.0328 774  0.13878  0.35353
##   0.36615 0.0328 774  0.25878  0.47353
##   0.26154 0.0328 774  0.15416  0.36891
##   0.42231 0.0328 774  0.31493  0.52968
##   0.06077 0.0323 774 -0.04508  0.16662
##  -0.12308 0.0323 774 -0.22893 -0.01723
##  -0.12308 0.0323 774 -0.22893 -0.01723
##  -0.00923 0.0328 774 -0.11661  0.09814
##  -0.07000 0.0328 774 -0.17738  0.03738
##   0.10462 0.0302 774  0.00549  0.20374
##   0.22462 0.0328 774  0.11724  0.33199
##   0.12000 0.0328 774  0.01262  0.22738
##   0.28077 0.0328 774  0.17339  0.38814
##  -0.18385 0.0323 774 -0.28970 -0.07799
##  -0.18385 0.0323 774 -0.28970 -0.07799
##  -0.07000 0.0328 774 -0.17738  0.03738
##  -0.13077 0.0328 774 -0.23814 -0.02339
##   0.04385 0.0328 774 -0.06353  0.15122
##   0.16385 0.0302 774  0.06472  0.26297
##   0.05923 0.0328 774 -0.04814  0.16661
##   0.22000 0.0328 774  0.11262  0.32738
##   0.00000 0.0323 774 -0.10585  0.10585
##   0.11385 0.0328 774  0.00647  0.22122
##   0.05308 0.0328 774 -0.05430  0.16045
##   0.22769 0.0328 774  0.12032  0.33507
##   0.34769 0.0328 774  0.24032  0.45507
##   0.24308 0.0302 774  0.14395  0.34220
##   0.40385 0.0328 774  0.29647  0.51122
##   0.11385 0.0328 774  0.00647  0.22122
##   0.05308 0.0328 774 -0.05430  0.16045
##   0.22769 0.0328 774  0.12032  0.33507
##   0.34769 0.0328 774  0.24032  0.45507
##   0.24308 0.0328 774  0.13570  0.35045
##   0.40385 0.0302 774  0.30472  0.50297
##  -0.06077 0.0332 774 -0.16965  0.04811
##   0.11385 0.0332 774  0.00497  0.22272
##   0.23385 0.0332 774  0.12497  0.34272
##   0.12923 0.0332 774  0.02035  0.23811
##   0.29000 0.0332 774  0.18112  0.39888
##   0.17462 0.0332 774  0.06574  0.28349
##   0.29462 0.0332 774  0.18574  0.40349
##   0.19000 0.0332 774  0.08112  0.29888
##   0.35077 0.0332 774  0.24189  0.45965
##   0.12000 0.0332 774  0.01112  0.22888
##   0.01538 0.0332 774 -0.09349  0.12426
##   0.17615 0.0332 774  0.06728  0.28503
##  -0.10462 0.0332 774 -0.21349  0.00426
##   0.05615 0.0332 774 -0.05272  0.16503
##   0.16077 0.0332 774  0.05189  0.26965
## 
## Confidence level used: 0.95 
## Conf-level adjustment: tukey method for comparing a family of 12 estimates

Take the relevant subset of differences:

t <- subset(t, contrast == "(binary-channel Rating_SE) - (binary-channel Rating_CC)" | 
               contrast == "(binary-radial Rating_SE) - (binary-radial Rating_CC)" |
               contrast == "(cont.-channel-limited Rating_SE) - (cont.-channel-limited Rating_CC)" |
               contrast == "(cont.-radial-limited Rating_SE) - (cont.-radial-limited Rating_CC)" |
               contrast == "(cont.-channel-unlimited Rating_SE) - (cont.-channel-unlimited Rating_CC)" |
               contrast == "(cont.-radial-unlimited Rating_SE) - (cont.-radial-unlimited Rating_CC)")

# binary channel 
lo <- t[1,5]
hi <- t[1,6]
(bin_channel_width <- hi - lo) # get the CI widths
## [1] 0.1982546
(bin_channel_width_moe <- (hi - lo)/2) # and half widths
## [1] 0.09912729
# binary radial
lo <- t[2,5]
hi <- t[2,6]
(bin_radial_width <- hi - lo)
## [1] 0.1982546
(bin_radial_width_moe <- (hi - lo)/2)
## [1] 0.09912729
# cont channel limited 
lo <- t[3,5]
hi <- t[3,6]
(cont_channel_limited_width <- hi - lo)
## [1] 0.1982546
(cont_channel_limited_width_moe <- (hi - lo)/2)
## [1] 0.09912729
# cont radial limited 
lo <- t[4,5]
hi <- t[4,6]
(cont_radial_limited_width <- hi - lo)
## [1] 0.1982546
(cont_radial_limited_width_moe <- (hi - lo)/2)
## [1] 0.09912729
# cont channel unlimited 
lo <- t[5,5]
hi <- t[5,6]
(cont_channel_unlimited_width <- hi - lo)
## [1] 0.1982546
(cont_channel_unlimited_width_moe <- (hi - lo)/2)
## [1] 0.09912729
# cont radial unlimited 
lo <- t[6,5]
hi <- t[6,6]
(cont_radial_unlimited_width <- hi - lo)
## [1] 0.1982546
(cont_radial_unlimited_width_moe <- (hi - lo)/2)
## [1] 0.09912729
cond <- c("bin_channel_width", "bin_radial_width", "cont_channel_limited_width", "cont_radial_limited_width", 
              "cont_channel_unlimited_width", "cont_radial_unlimited_width")

ci_width <- c(bin_channel_width, bin_radial_width, cont_channel_limited_width, cont_radial_limited_width, 
              cont_channel_unlimited_width, cont_radial_unlimited_width)

CI_widths <- data.frame(cond, ci_width) # CI width < 0.20 was used as the stopping rule for data collection
# factor the different differences (needed for a plot later)

t$contrast <- factor(t$contrast, levels = c("(binary-radial Rating_SE) - (binary-radial Rating_CC)", 
                                            "(binary-channel Rating_SE) - (binary-channel Rating_CC)",
                                            "(cont.-radial-unlimited Rating_SE) - (cont.-radial-unlimited Rating_CC)",
                                            "(cont.-radial-limited Rating_SE) - (cont.-radial-limited Rating_CC)",
                                            "(cont.-channel-unlimited Rating_SE) - (cont.-channel-unlimited Rating_CC)",
                                            "(cont.-channel-limited Rating_SE) - (cont.-channel-limited Rating_CC)"), 
                                  labels = c("binary-radial", 
                                             "binary-channel",
                                             "cont.-radial-unlimited",
                                             "cont.-radial-limited",
                                             "cont.-channel-unlimited",
                                             "cont.-channel-limited"
                                    
                                  )
                      )

3.5 Graphs

3.5.1 Overall

## Warning: Ignoring unknown aesthetics: y

3.5.2 Subplots

Continuous vs. Binary:

cont2 <- subset(continuous, select = c(1:4,7))
bin2 <- subset(binary, select = c(1:4,6))
cont_vs_binary <- rbind(cont2, bin2)
library(afex)
library(emmeans)

a1 <- aov_car(value ~ variable*var_type + Error(subj_code/(variable)), cont_vs_binary)
## Converting to factor: var_type
## Contrasts set to contr.sum for the following variables: var_type
#a1
ls1 <- lsmeans(a1, c("variable","var_type")) 
ls1
##  variable  var_type   lsmean     SE  df lower.CL upper.CL
##  Rating_SE binary      0.803 0.0167 778    0.770    0.836
##  Rating_CC binary      0.739 0.0170 778    0.705    0.772
##  Rating_SE continuous  0.746 0.0118 778    0.722    0.769
##  Rating_CC continuous  0.517 0.0120 778    0.493    0.540
## 
## Confidence level used: 0.95
t <- confint(pairs(ls1), level = 0.95)
t
##  contrast                                    estimate     SE  df lower.CL
##  Rating_SE binary - Rating_CC binary          0.06423 0.0221 778  0.00739
##  Rating_SE binary - Rating_SE continuous      0.05750 0.0204 778  0.00498
##  Rating_SE binary - Rating_CC continuous      0.28635 0.0205 778  0.23345
##  Rating_CC binary - Rating_SE continuous     -0.00673 0.0207 778 -0.06000
##  Rating_CC binary - Rating_CC continuous      0.22212 0.0208 778  0.16848
##  Rating_SE continuous - Rating_CC continuous  0.22885 0.0156 778  0.18866
##  upper.CL
##    0.1211
##    0.1100
##    0.3392
##    0.0465
##    0.2757
##    0.2690
## 
## Confidence level used: 0.95 
## Conf-level adjustment: tukey method for comparing a family of 4 estimates
t <- subset(t, contrast == "Rating_SE binary - Rating_CC binary" | 
               contrast == "Rating_SE continuous - Rating_CC continuous")
## Warning: Ignoring unknown aesthetics: y

Unlimited vs. Limited Energy:

library(afex)
library(emmeans)

a1 <- aov_car(value ~ variable*energy + Error(subj_code/(variable)), continuous)
## Converting to factor: energy
## Contrasts set to contr.sum for the following variables: energy
a1
## Anova Table (Type 3 tests)
## 
## Response: value
##            Effect     df  MSE          F  ges p.value
## 1          energy 1, 518 0.07  26.66 *** .025   <.001
## 2        variable 1, 518 0.07 184.36 *** .153   <.001
## 3 energy:variable 1, 518 0.07   10.65 ** .010    .001
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
ls1 <- lsmeans(a1, c("variable","energy")) 
ls1
##  variable  energy    lsmean     SE  df lower.CL upper.CL
##  Rating_SE specific   0.730 0.0172 518    0.697    0.764
##  Rating_CC specific   0.447 0.0162 518    0.415    0.478
##  Rating_SE unlimited  0.761 0.0172 518    0.727    0.795
##  Rating_CC unlimited  0.587 0.0162 518    0.555    0.619
## 
## Confidence level used: 0.95
t <- confint(pairs(ls1), level = 0.95)
t
##  contrast                                  estimate     SE  df lower.CL
##  Rating_SE specific - Rating_CC specific     0.2838 0.0238 518   0.2224
##  Rating_SE specific - Rating_SE unlimited   -0.0304 0.0243 518  -0.0931
##  Rating_SE specific - Rating_CC unlimited    0.1435 0.0236 518   0.0826
##  Rating_CC specific - Rating_SE unlimited   -0.3142 0.0236 518  -0.3751
##  Rating_CC specific - Rating_CC unlimited   -0.1404 0.0229 518  -0.1993
##  Rating_SE unlimited - Rating_CC unlimited   0.1738 0.0238 518   0.1124
##  upper.CL
##    0.3453
##    0.0324
##    0.2043
##   -0.2534
##   -0.0815
##    0.2353
## 
## Confidence level used: 0.95 
## Conf-level adjustment: tukey method for comparing a family of 4 estimates
t <- subset(t, contrast == "Rating_SE specific - Rating_CC specific" | 
               contrast == "Rating_SE unlimited - Rating_CC unlimited")
## Warning: Ignoring unknown aesthetics: y

Radial vs. Channel Transmission:

library(afex)
library(emmeans)

a1 <- aov_car(value ~ variable*transmission + Error(subj_code/(variable)), continuous)
## Converting to factor: transmission
## Contrasts set to contr.sum for the following variables: transmission
a1
## Anova Table (Type 3 tests)
## 
## Response: value
##                  Effect     df  MSE          F  ges p.value
## 1          transmission 1, 518 0.07  12.33 *** .012   <.001
## 2              variable 1, 518 0.07 192.10 *** .154   <.001
## 3 transmission:variable 1, 518 0.07  32.84 *** .030   <.001
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
ls1 <- lsmeans(a1, c("variable","transmission")) 
ls1
##  variable  transmission lsmean     SE  df lower.CL upper.CL
##  Rating_SE channel       0.822 0.0166 518    0.790    0.855
##  Rating_CC channel       0.499 0.0167 518    0.466    0.532
##  Rating_SE radial        0.669 0.0166 518    0.636    0.701
##  Rating_CC radial        0.535 0.0167 518    0.502    0.567
## 
## Confidence level used: 0.95
t <- confint(pairs(ls1), level = 0.95)
t
##  contrast                              estimate     SE  df lower.CL upper.CL
##  Rating_SE channel - Rating_CC channel   0.3235 0.0234 518   0.2633   0.3836
##  Rating_SE channel - Rating_SE radial    0.1535 0.0234 518   0.0931   0.2139
##  Rating_SE channel - Rating_CC radial    0.2877 0.0235 518   0.2271   0.3483
##  Rating_CC channel - Rating_SE radial   -0.1700 0.0235 518  -0.2306  -0.1094
##  Rating_CC channel - Rating_CC radial   -0.0358 0.0236 518  -0.0967   0.0251
##  Rating_SE radial - Rating_CC radial     0.1342 0.0234 518   0.0740   0.1944
## 
## Confidence level used: 0.95 
## Conf-level adjustment: tukey method for comparing a family of 4 estimates
t <- subset(t, contrast == "Rating_SE channel - Rating_CC channel" | 
               contrast == "Rating_SE radial - Rating_CC radial")
## Warning: Ignoring unknown aesthetics: y

Cohen’s ds:

dat <- subset(tdata, Cond_sum == "cont_channel_limited")


# since we have a repeated-meausres design, we now need the correlations of the ratings
library(dplyr) # for pipe operator
dat -> t
r <- cor(t$Rating_CC, t$Rating_SE)
r
## [1] -0.3961798
# now compute ES and SE and CI of it
# using the esc package because it gives SE of the ES directly
library(esc)

# get means and sds
m1 <- dat %>%
          summarize(Mean1 = mean(Rating_SE))

sd1 <- dat %>%
          summarize(SD1 = sd(Rating_SE))


m2 <- dat %>%
          summarize(Mean2 = mean(Rating_CC))

sd2 <- dat %>%
          summarize(SD2 = sd(Rating_CC))



d <- esc_mean_sd(
  grp1m = m1[,1], grp1sd = sd1[,1], grp1n = length(dat$subj_code),
  grp2m = m2[,1], grp2sd = sd2[,1], grp2n = length(dat$subj_code),
  r = r,
  es.type = "d"
)
d
## 
## Effect Size Calculation for Meta Analysis
## 
##      Conversion: mean and sd (within-subject) to effect size d
##     Effect Size:   1.0209
##  Standard Error:   0.1319
##        Variance:   0.0174
##        Lower CI:   0.7624
##        Upper CI:   1.2793
##          Weight:  57.5085
d$ci.lo
##    Mean1
## 1 0.7624
d$ci.hi
##      Mean1
## 1 1.279307
d_ci <- (d$ci.lo - d$ci.hi)
d_ci
##        Mean1
## 1 -0.5169066
d_ch_limit <- d$es
d_ch_limit_lo <- d$ci.lo
d_ch_limit_hi <- d$ci.hi
dat <- subset(tdata, Cond_sum == "cont_channel_unlimited")


# since we have a repeated-meausres design, we now need the correlations of the ratings
library(dplyr) # for pipe operator
dat -> t
r <- cor(t$Rating_CC, t$Rating_SE)
r
## [1] -0.1201605
# now compute ES and SE and CI of it
# using the esc package because it gives SE of the ES directly
library(esc)

# get means and sds
m1 <- dat %>%
          summarize(Mean1 = mean(Rating_SE))

sd1 <- dat %>%
          summarize(SD1 = sd(Rating_SE))


m2 <- dat %>%
          summarize(Mean2 = mean(Rating_CC))

sd2 <- dat %>%
          summarize(SD2 = sd(Rating_CC))



d <- esc_mean_sd(
  grp1m = m1[,1], grp1sd = sd1[,1], grp1n = length(dat$subj_code),
  grp2m = m2[,1], grp2sd = sd2[,1], grp2n = length(dat$subj_code),
  r = r,
  es.type = "d"
)
d
## 
## Effect Size Calculation for Meta Analysis
## 
##      Conversion: mean and sd (within-subject) to effect size d
##     Effect Size:   0.6443
##  Standard Error:   0.1272
##        Variance:   0.0162
##        Lower CI:   0.3950
##        Upper CI:   0.8937
##          Weight:  61.7931
d$ci.lo
##       Mean1
## 1 0.3950105
d$ci.hi
##       Mean1
## 1 0.8936746
d_ci <- (d$ci.lo - d$ci.hi)
d_ci
##       Mean1
## 1 -0.498664
d_ch_unlimit <- d$es
d_ch_unlimit_lo <- d$ci.lo
d_ch_unlimit_hi <- d$ci.hi
dat <- subset(tdata, Cond_sum == "cont_radial_limited")


# since we have a repeated-meausres design, we now need the correlations of the ratings
library(dplyr) # for pipe operator
dat -> t
r <- cor(t$Rating_CC, t$Rating_SE)
r
## [1] 0.07832772
# now compute ES and SE and CI of it
# using the esc package because it gives SE of the ES directly
library(esc)

# get means and sds
m1 <- dat %>%
          summarize(Mean1 = mean(Rating_SE))

sd1 <- dat %>%
          summarize(SD1 = sd(Rating_SE))


m2 <- dat %>%
          summarize(Mean2 = mean(Rating_CC))

sd2 <- dat %>%
          summarize(SD2 = sd(Rating_CC))



d <- esc_mean_sd(
  grp1m = m1[,1], grp1sd = sd1[,1], grp1n = length(dat$subj_code),
  grp2m = m2[,1], grp2sd = sd2[,1], grp2n = length(dat$subj_code),
  r = r,
  es.type = "d"
)
d
## 
## Effect Size Calculation for Meta Analysis
## 
##      Conversion: mean and sd (within-subject) to effect size d
##     Effect Size:   0.4182
##  Standard Error:   0.1254
##        Variance:   0.0157
##        Lower CI:   0.1725
##        Upper CI:   0.6640
##          Weight:  63.6093
d$ci.lo
##       Mean1
## 1 0.1724664
d$ci.hi
##       Mean1
## 1 0.6639598
d_ci <- (d$ci.lo - d$ci.hi)
d_ci
##        Mean1
## 1 -0.4914934
d_rad_limit <- d$es
d_rad_limit_lo <- d$ci.lo
d_rad_limit_hi <- d$ci.hi
dat <- subset(tdata, Cond_sum == "cont_radial_unlimited")


# since we have a repeated-meausres design, we now need the correlations of the ratings
library(dplyr) # for pipe operator
dat -> t
r <- cor(t$Rating_CC, t$Rating_SE)
r
## [1] 0.3193679
# now compute ES and SE and CI of it
# using the esc package because it gives SE of the ES directly
library(esc)

# get means and sds
m1 <- dat %>%
          summarize(Mean1 = mean(Rating_SE))

sd1 <- dat %>%
          summarize(SD1 = sd(Rating_SE))


m2 <- dat %>%
          summarize(Mean2 = mean(Rating_CC))

sd2 <- dat %>%
          summarize(SD2 = sd(Rating_CC))



d <- esc_mean_sd(
  grp1m = m1[,1], grp1sd = sd1[,1], grp1n = length(dat$subj_code),
  grp2m = m2[,1], grp2sd = sd2[,1], grp2n = length(dat$subj_code),
  r = r,
  es.type = "d"
)
d
## 
## Effect Size Calculation for Meta Analysis
## 
##      Conversion: mean and sd (within-subject) to effect size d
##     Effect Size:   0.3273
##  Standard Error:   0.1249
##        Variance:   0.0156
##        Lower CI:   0.0826
##        Upper CI:   0.5721
##          Weight:  64.1410
d$ci.lo
##        Mean1
## 1 0.08259827
d$ci.hi
##       Mean1
## 1 0.5720505
d_ci <- (d$ci.lo - d$ci.hi)
d_ci
##        Mean1
## 1 -0.4894522
d_rad_unlimit <- d$es
d_rad_unlimit_lo <- d$ci.lo
d_rad_unlimit_hi <- d$ci.hi
dat <- subset(tdata, Cond_sum == "binary_radial")


# since we have a repeated-meausres design, we now need the correlations of the ratings
library(dplyr) # for pipe operator
dat -> t
r <- cor(t$Rating_CC, t$Rating_SE)
r
## [1] 0.4559072
# now compute ES and SE and CI of it
# using the esc package because it gives SE of the ES directly
library(esc)

# get means and sds
m1 <- dat %>%
          summarize(Mean1 = mean(Rating_SE))

sd1 <- dat %>%
          summarize(SD1 = sd(Rating_SE))


m2 <- dat %>%
          summarize(Mean2 = mean(Rating_CC))

sd2 <- dat %>%
          summarize(SD2 = sd(Rating_CC))



d <- esc_mean_sd(
  grp1m = m1[,1], grp1sd = sd1[,1], grp1n = length(dat$subj_code),
  grp2m = m2[,1], grp2sd = sd2[,1], grp2n = length(dat$subj_code),
  r = r,
  es.type = "d"
)
d
## 
## Effect Size Calculation for Meta Analysis
## 
##      Conversion: mean and sd (within-subject) to effect size d
##     Effect Size:   0.2065
##  Standard Error:   0.1244
##        Variance:   0.0155
##        Lower CI:  -0.0372
##        Upper CI:   0.4503
##          Weight:  64.6552
d$ci.lo
##         Mean1
## 1 -0.03721408
d$ci.hi
##       Mean1
## 1 0.4502877
d_ci <- (d$ci.lo - d$ci.hi)
d_ci
##        Mean1
## 1 -0.4875018
d_bin_rad <- d$es
d_bin_rad_lo <- d$ci.lo
d_bin_rad_hi <- d$ci.hi
dat <- subset(tdata, Cond_sum == "binary_channel")


# since we have a repeated-meausres design, we now need the correlations of the ratings
library(dplyr) # for pipe operator
dat -> t
r <- cor(t$Rating_CC, t$Rating_SE)
r
## [1] 0.4227151
# now compute ES and SE and CI of it
# using the esc package because it gives SE of the ES directly
library(esc)

# get means and sds
m1 <- dat %>%
          summarize(Mean1 = mean(Rating_SE))

sd1 <- dat %>%
          summarize(SD1 = sd(Rating_SE))


m2 <- dat %>%
          summarize(Mean2 = mean(Rating_CC))

sd2 <- dat %>%
          summarize(SD2 = sd(Rating_CC))



d <- esc_mean_sd(
  grp1m = m1[,1], grp1sd = sd1[,1], grp1n = length(dat$subj_code),
  grp2m = m2[,1], grp2sd = sd2[,1], grp2n = length(dat$subj_code),
  r = r,
  es.type = "d"
)
d
## 
## Effect Size Calculation for Meta Analysis
## 
##      Conversion: mean and sd (within-subject) to effect size d
##     Effect Size:   0.2486
##  Standard Error:   0.1245
##        Variance:   0.0155
##        Lower CI:   0.0045
##        Upper CI:   0.4926
##          Weight:  64.5018
d$ci.lo
##         Mean1
## 1 0.004532089
d$ci.hi
##       Mean1
## 1 0.4926133
d_ci <- (d$ci.lo - d$ci.hi)
d_ci
##        Mean1
## 1 -0.4880812
d_bin_ch <- d$es
d_bin_ch_lo <- d$ci.lo
d_bin_ch_hi <- d$ci.hi
contrast <- c("binary-radial", "binary-channel", "cont.-radial-unlimited", "cont.-radial-limited", "cont.-channel-unlimited", "cont.-channel-limited")
estimate <- c(d_bin_rad[,1], d_bin_ch[,1], d_rad_unlimit[,1], d_rad_limit[,1], d_ch_unlimit[,1], d_ch_limit[,1])
ci_lo <- c(d_bin_rad_lo[,1], d_bin_ch_lo[,1], d_rad_unlimit_lo[,1], d_rad_limit_lo[,1], d_ch_unlimit_lo[,1], d_ch_limit_lo[,1])
ci_hi <- c(d_bin_rad_hi[,1], d_bin_ch_hi[,1], d_rad_unlimit_hi[,1], d_rad_limit_hi[,1], d_ch_unlimit_hi[,1], d_ch_limit_hi[,1])

ds <- data.frame(contrast, estimate, ci_lo, ci_hi)
ds$contrast <- factor(ds$contrast, levels = c("binary-radial", "binary-channel", 
                                              "cont.-radial-unlimited", "cont.-radial-limited", "cont.-channel-unlimited", "cont.-channel-limited"))
## Warning: Ignoring unknown aesthetics: y