This script contains the analyses conducted on data related to participants who took part in our study “Toward a Social Rubber Hand”.

First, we load packages we need for analyses #PACKAGES

library (tidyverse) #for data handling
## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.2 ──
## ✔ ggplot2 3.4.0      ✔ purrr   0.3.5 
## ✔ tibble  3.1.8      ✔ dplyr   1.0.10
## ✔ tidyr   1.2.1      ✔ stringr 1.4.1 
## ✔ readr   2.1.3      ✔ forcats 0.5.2 
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
library(readxl) #to read excel files
library(writexl)  #to export data as excel file 
## Warning: il pacchetto 'writexl' è stato creato con R versione 4.2.3
library(lme4) 
## Caricamento del pacchetto richiesto: Matrix
## 
## Caricamento pacchetto: 'Matrix'
## 
## I seguenti oggetti sono mascherati da 'package:tidyr':
## 
##     expand, pack, unpack
library(lmerTest)
## 
## Caricamento pacchetto: 'lmerTest'
## 
## Il seguente oggetto è mascherato da 'package:lme4':
## 
##     lmer
## 
## Il seguente oggetto è mascherato da 'package:stats':
## 
##     step
library(emmeans) 
## Welcome to emmeans.
## Caution: You lose important information if you filter this package's results.
## See '? untidy'
library(ggplot2)

Then, we proceed with by importing the row data matrix

#import file
SRHI <- read_excel("LMM_Matrix.xlsx") #import file

#SRH_TraitQuestionnaires <- SRH_TraitQuestionnaires[-1,] 

SRHI
## # A tibble: 2,340 × 37
##    Block Session Subject VisuoSp…¹ RTNoO…² Basel…³ Drift1 Drift2 Owner…⁴ Locat…⁵
##    <chr>   <dbl>   <dbl> <chr>       <dbl>   <dbl>  <dbl>  <dbl>   <dbl>   <dbl>
##  1 A           2       1 cong          219    17.8   17.6   18.7      -3      -3
##  2 A           2       1 cong          246    17.8   17.6   18.7      -3      -3
##  3 A           2       1 cong          253    17.8   17.6   18.7      -3      -3
##  4 A           2       1 cong          254    17.8   17.6   18.7      -3      -3
##  5 A           2       1 cong          267    17.8   17.6   18.7      -3      -3
##  6 A           2       1 cong          279    17.8   17.6   18.7      -3      -3
##  7 A           2       1 cong          279    17.8   17.6   18.7      -3      -3
##  8 A           2       1 cong          297    17.8   17.6   18.7      -3      -3
##  9 A           2       1 cong          298    17.8   17.6   18.7      -3      -3
## 10 A           2       1 cong          300    17.8   17.6   18.7      -3      -3
## # … with 2,330 more rows, 27 more variables: HandLoss <dbl>, RT1_I <dbl>,
## #   RT2_F <dbl>, RT3_P <dbl>, DT1_I <dbl>, DT2_F <dbl>, DT3_P <dbl>,
## #   SI_1 <dbl>, SI_2 <dbl>, SI_3 <dbl>, Noticing <dbl>, NotDistracting <dbl>,
## #   NotWorrying <dbl>, AttentionRegulation <dbl>, EmotionalAwareness <dbl>,
## #   SelfRegulation <dbl>, BodyListening <dbl>, Trusting <dbl>,
## #   PerspectiveTaking <dbl>, Fantasy <dbl>, EmpaticConcern <dbl>,
## #   PersonalDistress <dbl>, Means_STQ <dbl>, TouchComfortability <dbl>, …

Then we declare our factors, that are: the Subject number, the Session order (if participants performed first the a/synchronous block), the block (a/synchronous) and the VisuoSpatialCongruency (in/congruent).

factor_decl = c("Subject", "Session", "Block","VisuoSpatialCongruency")
SRHI[factor_decl] <- lapply(SRHI[factor_decl], factor)  

#LMM We first test the effect of “Block” (stroking type, Synchronous or Asynchronous) and “VisuoSpatialCongruency” (visuo-tactile Congruence or Incongruence) on pre-processed Reaction Times “RTNoOutlier”, considering “Subject” as random effect.

#LMM
lmm_model <- lmer(RTNoOutlier ~ Block * VisuoSpatialCongruency + (1 + Block * VisuoSpatialCongruency| Subject), control = lmerControl(optimizer = "bobyqa"), data = SRHI)

#verifysingularity
isSingular(lmm_model)
## [1] FALSE
#lookattheresult
summary(lmm_model)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: 
## RTNoOutlier ~ Block * VisuoSpatialCongruency + (1 + Block * VisuoSpatialCongruency |  
##     Subject)
##    Data: SRHI
## Control: lmerControl(optimizer = "bobyqa")
## 
## REML criterion at convergence: 28753
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.0684 -0.5747 -0.1239  0.3773  5.9497 
## 
## Random effects:
##  Groups   Name                             Variance Std.Dev. Corr             
##  Subject  (Intercept)                       8691     93.22                    
##           BlockS                            1939     44.03    0.01            
##           VisuoSpatialCongruencyinc         3298     57.43    0.10 -0.45      
##           BlockS:VisuoSpatialCongruencyinc  2101     45.84   -0.27  0.36 -0.55
##  Residual                                  11569    107.56                    
## Number of obs: 2340, groups:  Subject, 33
## 
## Fixed effects:
##                                  Estimate Std. Error      df t value Pr(>|t|)
## (Intercept)                       322.741     16.790  31.952  19.222  < 2e-16
## BlockS                              9.770      9.783  31.901   0.999    0.325
## VisuoSpatialCongruencyinc         123.264     11.890  32.860  10.367 6.85e-12
## BlockS:VisuoSpatialCongruencyinc  -12.761     12.033  33.426  -1.060    0.297
##                                     
## (Intercept)                      ***
## BlockS                              
## VisuoSpatialCongruencyinc        ***
## BlockS:VisuoSpatialCongruencyinc    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) BlockS VsSptC
## BlockS      -0.109              
## VsSptlCngrn -0.008 -0.138       
## BlckS:VsSpC -0.078 -0.129 -0.596

Since the model is not singular, we continue to explore the data through post-hoc comparisons.

# Means of Block e VisuoSpatialCongruency
emmeans_interaction <- emmeans(lmm_model, ~ Block * VisuoSpatialCongruency)
emmeans_block <- emmeans(lmm_model, ~ Block)
## NOTE: Results may be misleading due to involvement in interactions
emmeans_visuo <- emmeans(lmm_model, ~ VisuoSpatialCongruency)
## NOTE: Results may be misleading due to involvement in interactions
# Post hoc comparisons
posthoc_block <- contrast(emmeans_block, adjust = "bonferroni")
posthoc_visuo <- contrast(emmeans_visuo, adjust = "bonferroni")
posthoc_interaction <- pairs(emmeans_interaction, adjust = "bonferroni")

#post hoc summary
summary(posthoc_block)
##  contrast estimate  SE df t.ratio p.value
##  A effect    -1.69 5.4 32  -0.314  1.0000
##  S effect     1.69 5.4 32   0.314  1.0000
## 
## Results are averaged over the levels of: VisuoSpatialCongruency 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests
summary(posthoc_visuo)
##  contrast    estimate   SE df t.ratio p.value
##  cong effect    -58.4 4.81 32 -12.158  <.0001
##  inc effect      58.4 4.81 32  12.158  <.0001
## 
## Results are averaged over the levels of: Block 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests
summary(posthoc_interaction)
##  contrast        estimate    SE   df t.ratio p.value
##  A cong - S cong    -9.77  9.78 32.0  -0.999  1.0000
##  A cong - A inc   -123.26 11.90 31.9 -10.361  <.0001
##  A cong - S inc   -120.27 12.21 32.0  -9.851  <.0001
##  S cong - A inc   -113.49 16.41 32.0  -6.915  <.0001
##  S cong - S inc   -110.50 10.76 31.9 -10.267  <.0001
##  A inc - S inc       2.99 14.50 31.9   0.206  1.0000
## 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 6 tests

#STQ The social touch questionnaire (STQ; Wilhelm et al., 2001) comprises 20 items. Participants were asked to ‘Indicate to what extent each of the following statements is characteristic or true for you’ on a 0–4 scale (0=not at all, 1=slightly, 2=moderately, 3=very, 4=extremely).

Items were chosen to provide a broad sample of affects and attitudes towards social touch. The scoring were preprocessed in a different script. Here we considered the mean scores as covariate for our LMM.

#LMM + STQ covariate
lmm_model_STQ <- lmer(RTNoOutlier ~ Block * VisuoSpatialCongruency * Means_STQ  + (1 + Block * VisuoSpatialCongruency| Subject), control = lmerControl(optimizer = "bobyqa"), data = SRHI)

#verifysingularity
isSingular(lmm_model_STQ)
## [1] FALSE
#summary
summary(lmm_model_STQ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: RTNoOutlier ~ Block * VisuoSpatialCongruency * Means_STQ + (1 +  
##     Block * VisuoSpatialCongruency | Subject)
##    Data: SRHI
## Control: lmerControl(optimizer = "bobyqa")
## 
## REML criterion at convergence: 28721
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.0788 -0.5756 -0.1252  0.3865  5.9393 
## 
## Random effects:
##  Groups   Name                             Variance Std.Dev. Corr             
##  Subject  (Intercept)                       8950     94.60                    
##           BlockS                            2009     44.83    0.01            
##           VisuoSpatialCongruencyinc         3375     58.10    0.11 -0.46      
##           BlockS:VisuoSpatialCongruencyinc  2224     47.16   -0.26  0.34 -0.54
##  Residual                                  11570    107.56                    
## Number of obs: 2340, groups:  Subject, 33
## 
## Fixed effects:
##                                            Estimate Std. Error      df t value
## (Intercept)                                 302.838     56.622  30.986   5.348
## BlockS                                       27.662     32.944  31.146   0.840
## VisuoSpatialCongruencyinc                   148.489     39.713  31.427   3.739
## Means_STQ                                    10.355     28.126  30.965   0.368
## BlockS:VisuoSpatialCongruencyinc            -27.745     40.364  32.017  -0.687
## BlockS:Means_STQ                             -9.320     16.374  31.207  -0.569
## VisuoSpatialCongruencyinc:Means_STQ         -13.118     19.700  31.251  -0.666
## BlockS:VisuoSpatialCongruencyinc:Means_STQ    7.799     20.066  32.056   0.389
##                                            Pr(>|t|)    
## (Intercept)                                7.92e-06 ***
## BlockS                                     0.407481    
## VisuoSpatialCongruencyinc                  0.000739 ***
## Means_STQ                                  0.715245    
## BlockS:VisuoSpatialCongruencyinc           0.496796    
## BlockS:Means_STQ                           0.573320    
## VisuoSpatialCongruencyinc:Means_STQ        0.510379    
## BlockS:VisuoSpatialCongruencyinc:Means_STQ 0.700097    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) BlockS VsSptC Mn_STQ BlS:VSC BS:M_S VSC:M_
## BlockS      -0.104                                           
## VsSptlCngrn -0.002 -0.150                                    
## Means_STQ   -0.954  0.099  0.002                             
## BlckS:VsSpC -0.082 -0.126 -0.590  0.078                      
## BlckS:M_STQ  0.099 -0.954  0.143 -0.104  0.121               
## VsSpC:M_STQ  0.002  0.143 -0.953 -0.001  0.561  -0.151       
## BS:VSC:M_ST  0.078  0.121  0.560 -0.082 -0.953  -0.127 -0.587

Since the model is not singular, we can continue to explore the data through post-hoc comparisons.

# Means of Block e VisuoSpatialCongruency
emmeans_interaction_STQ <- emmeans(lmm_model_STQ, ~ Block * VisuoSpatialCongruency| Means_STQ)
emmeans_block_STQ <- emmeans(lmm_model_STQ, ~ Block| Means_STQ)
## NOTE: Results may be misleading due to involvement in interactions
emmeans_visuo_STQ <- emmeans(lmm_model_STQ, ~ VisuoSpatialCongruency| Means_STQ)
## NOTE: Results may be misleading due to involvement in interactions
emmeans_interaction2_STQ <- emmeans(lmm_model_STQ, ~ Block * Means_STQ| VisuoSpatialCongruency)
emmeans_interaction3_STQ <- emmeans(lmm_model_STQ, ~ VisuoSpatialCongruency * Means_STQ| Block)

# Post hoc comparisons
posthoc_block_STQ <- contrast(emmeans_block_STQ, adjust = "bonferroni")
posthoc_visuo_STQ <- contrast(emmeans_visuo_STQ, adjust = "bonferroni")
posthoc_interaction_STQ <- pairs(emmeans_interaction_STQ, adjust = "bonferroni")
posthoc_interaction2_STQ <- pairs(emmeans_interaction2_STQ, adjust = "bonferroni")
posthoc_interaction3_STQ <- pairs(emmeans_interaction3_STQ, adjust = "bonferroni")

#post hoc summary
summary(posthoc_block_STQ)
## Means_STQ = 1.92:
##  contrast estimate   SE df t.ratio p.value
##  A effect     -1.7 5.48 31  -0.309  1.0000
##  S effect      1.7 5.48 31   0.309  1.0000
## 
## Results are averaged over the levels of: VisuoSpatialCongruency 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests
summary(posthoc_visuo_STQ)
## Means_STQ = 1.92:
##  contrast    estimate   SE df t.ratio p.value
##  cong effect    -58.5 4.86 31 -12.039  <.0001
##  inc effect      58.5 4.86 31  12.039  <.0001
## 
## Results are averaged over the levels of: Block 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests
summary(posthoc_interaction_STQ)
## Means_STQ = 1.92:
##  contrast        estimate    SE   df t.ratio p.value
##  A cong - S cong    -9.78  9.89 31.0  -0.989  1.0000
##  A cong - A inc   -123.32 12.00 30.9 -10.280  <.0001
##  A cong - S inc   -120.32 12.31 31.0  -9.776  <.0001
##  S cong - A inc   -113.54 16.66 31.0  -6.816  <.0001
##  S cong - S inc   -110.54 10.92 31.0 -10.126  <.0001
##  A inc - S inc       3.00 14.72 30.9   0.204  1.0000
## 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 6 tests
summary(posthoc_interaction2_STQ)
## VisuoSpatialCongruency = cong:
##  contrast                                                  estimate    SE   df
##  A Means_STQ1.91865384615385 - S Means_STQ1.91865384615385    -9.78  9.89 31.0
##  t.ratio p.value
##   -0.989  0.3305
## 
## VisuoSpatialCongruency = inc:
##  contrast                                                  estimate    SE   df
##  A Means_STQ1.91865384615385 - S Means_STQ1.91865384615385     3.00 14.72 30.9
##  t.ratio p.value
##    0.204  0.8398
## 
## Degrees-of-freedom method: kenward-roger
summary(posthoc_interaction3_STQ)
## Block = A:
##  contrast                                                       estimate   SE
##  cong Means_STQ1.91865384615385 - inc Means_STQ1.91865384615385     -123 12.0
##    df t.ratio p.value
##  30.9 -10.280  <.0001
## 
## Block = S:
##  contrast                                                       estimate   SE
##  cong Means_STQ1.91865384615385 - inc Means_STQ1.91865384615385     -111 10.9
##    df t.ratio p.value
##  31.0 -10.126  <.0001
## 
## Degrees-of-freedom method: kenward-roger

#MAIA We used the French validate version of the Multidimensional Assessment of Interoceptive Awareness (Willem et al., 2022). It is a 32-item rating scale that measures Interoceptive Awareness, which refers to the features of interoception that are accessible to consciousness. The MAIA is a 6-point Likert format, ranging from 0 (never) to 5 (always), which evaluates 8 dimensions of interoceptive awareness: NOTICING; NOT DISTRACTING and NOT WORRYING; ATTENTION REGULATION; EMOTIONAL AWARENESS; SELF-REGULATION; BODY LISTENING and TRUSTING.

The scoring were preprocessed in a different script. Here we considered the mean scores as covariate for our LMM.

#LMM + MAIA dimensions as covariate
lmm_model_N <- lmer(RTNoOutlier ~ Block * VisuoSpatialCongruency * Noticing + (1 + Block * VisuoSpatialCongruency| Subject), control = lmerControl(optimizer = "bobyqa"), data = SRHI)
lmm_model_ND <- lmer(RTNoOutlier ~ Block * VisuoSpatialCongruency * NotDistracting + (1 + Block * VisuoSpatialCongruency| Subject), control = lmerControl(optimizer = "bobyqa"), data = SRHI)
lmm_model_NW <- lmer(RTNoOutlier ~ Block * VisuoSpatialCongruency * NotWorrying + (1 + Block * VisuoSpatialCongruency| Subject), control = lmerControl(optimizer = "bobyqa"), data = SRHI)
lmm_model_AR <- lmer(RTNoOutlier ~ Block * VisuoSpatialCongruency * AttentionRegulation + (1 + Block * VisuoSpatialCongruency| Subject), control = lmerControl(optimizer = "bobyqa"), data = SRHI)
lmm_model_EA <- lmer(RTNoOutlier ~ Block * VisuoSpatialCongruency * EmotionalAwareness + (1 + Block * VisuoSpatialCongruency| Subject), control = lmerControl(optimizer = "bobyqa"), data = SRHI)
lmm_model_SR <- lmer(RTNoOutlier ~ Block * VisuoSpatialCongruency * SelfRegulation + (1 + Block * VisuoSpatialCongruency| Subject), control = lmerControl(optimizer = "bobyqa"), data = SRHI)
lmm_model_BL <- lmer(RTNoOutlier ~ Block * VisuoSpatialCongruency * BodyListening + (1 + Block * VisuoSpatialCongruency| Subject), control = lmerControl(optimizer = "bobyqa"), data = SRHI)
lmm_model_T <- lmer(RTNoOutlier ~ Block * VisuoSpatialCongruency * Trusting + (1 + Block * VisuoSpatialCongruency| Subject), control = lmerControl(optimizer = "bobyqa"), data = SRHI)

#verifysingularity
isSingular(lmm_model_N)
## [1] FALSE
isSingular(lmm_model_ND)
## [1] FALSE
isSingular(lmm_model_NW)
## [1] FALSE
isSingular(lmm_model_AR)
## [1] FALSE
isSingular(lmm_model_EA)
## [1] FALSE
isSingular(lmm_model_SR)
## [1] FALSE
isSingular(lmm_model_BL)
## [1] FALSE
isSingular(lmm_model_T)
## [1] FALSE
#summary
summary(lmm_model_N)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: RTNoOutlier ~ Block * VisuoSpatialCongruency * Noticing + (1 +  
##     Block * VisuoSpatialCongruency | Subject)
##    Data: SRHI
## Control: lmerControl(optimizer = "bobyqa")
## 
## REML criterion at convergence: 28722.1
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.0757 -0.5735 -0.1260  0.3810  5.9423 
## 
## Random effects:
##  Groups   Name                             Variance Std.Dev. Corr             
##  Subject  (Intercept)                       8991     94.82                    
##           BlockS                            1910     43.70    0.00            
##           VisuoSpatialCongruencyinc         3425     58.52    0.10 -0.44      
##           BlockS:VisuoSpatialCongruencyinc  2242     47.35   -0.26  0.35 -0.55
##  Residual                                  11570    107.56                    
## Number of obs: 2340, groups:  Subject, 33
## 
## Fixed effects:
##                                           Estimate Std. Error      df t value
## (Intercept)                                315.432     80.844  30.911   3.902
## BlockS                                      61.389     46.162  30.910   1.330
## VisuoSpatialCongruencyinc                  105.463     58.276  34.009   1.810
## Noticing                                     2.171     23.493  30.907   0.092
## BlockS:VisuoSpatialCongruencyinc           -19.564     58.913  34.243  -0.332
## BlockS:Noticing                            -15.344     13.414  30.905  -1.144
## VisuoSpatialCongruencyinc:Noticing           5.286     16.875  33.623   0.313
## BlockS:VisuoSpatialCongruencyinc:Noticing    2.034     17.059  33.871   0.119
##                                           Pr(>|t|)    
## (Intercept)                               0.000481 ***
## BlockS                                    0.193288    
## VisuoSpatialCongruencyinc                 0.079186 .  
## Noticing                                  0.926973    
## BlockS:VisuoSpatialCongruencyinc          0.741853    
## BlockS:Noticing                           0.261469    
## VisuoSpatialCongruencyinc:Noticing        0.756009    
## BlockS:VisuoSpatialCongruencyinc:Noticing 0.905805    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) BlockS VsSptC Notcng BlS:VSC BlcS:N VsSC:N
## BlockS      -0.107                                           
## VsSptlCngrn -0.008 -0.128                                    
## Noticing    -0.977  0.105  0.008                             
## BlckS:VsSpC -0.078 -0.125 -0.613  0.076                      
## BlckS:Ntcng  0.105 -0.977  0.126 -0.107  0.123               
## VsSptlCng:N  0.008  0.126 -0.978 -0.008  0.599  -0.129       
## BlckS:VSC:N  0.076  0.123  0.599 -0.078 -0.978  -0.126 -0.610
summary(lmm_model_ND)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: RTNoOutlier ~ Block * VisuoSpatialCongruency * NotDistracting +  
##     (1 + Block * VisuoSpatialCongruency | Subject)
##    Data: SRHI
## Control: lmerControl(optimizer = "bobyqa")
## 
## REML criterion at convergence: 28715.1
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.0665 -0.5769 -0.1248  0.3804  5.9518 
## 
## Random effects:
##  Groups   Name                             Variance Std.Dev. Corr             
##  Subject  (Intercept)                       8983     94.78                    
##           BlockS                            2018     44.92    0.00            
##           VisuoSpatialCongruencyinc         3447     58.71    0.10 -0.44      
##           BlockS:VisuoSpatialCongruencyinc  1598     39.98   -0.32  0.34 -0.64
##  Residual                                  11569    107.56                    
## Number of obs: 2340, groups:  Subject, 33
## 
## Fixed effects:
##                                                 Estimate Std. Error      df
## (Intercept)                                      330.316     47.603  31.050
## BlockS                                            20.764     27.694  31.217
## VisuoSpatialCongruencyinc                        119.698     33.799  32.219
## NotDistracting                                    -3.766     22.097  30.987
## BlockS:VisuoSpatialCongruencyinc                  52.888     31.958  33.688
## BlockS:NotDistracting                             -5.487     12.835  30.966
## VisuoSpatialCongruencyinc:NotDistracting           1.799     15.707  32.282
## BlockS:VisuoSpatialCongruencyinc:NotDistracting  -32.708     14.844  33.684
##                                                 t value Pr(>|t|)    
## (Intercept)                                       6.939 8.69e-08 ***
## BlockS                                            0.750  0.45900    
## VisuoSpatialCongruencyinc                         3.541  0.00124 ** 
## NotDistracting                                   -0.170  0.86577    
## BlockS:VisuoSpatialCongruencyinc                  1.655  0.10723    
## BlockS:NotDistracting                            -0.428  0.67197    
## VisuoSpatialCongruencyinc:NotDistracting          0.115  0.90952    
## BlockS:VisuoSpatialCongruencyinc:NotDistracting  -2.203  0.03451 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) BlockS VsSptC NtDstr BlS:VSC BlS:ND VSC:ND
## BlockS      -0.115                                           
## VsSptlCngrn -0.011 -0.135                                    
## NotDstrctng -0.934  0.106  0.010                             
## BlckS:VsSpC -0.092 -0.168 -0.634  0.086                      
## BlckS:NtDst  0.106 -0.934  0.127 -0.113  0.155               
## VsSptlCn:ND  0.010  0.126 -0.934 -0.010  0.592  -0.137       
## BlcS:VSC:ND  0.086  0.155  0.593 -0.093 -0.934  -0.164 -0.635
summary(lmm_model_NW)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: RTNoOutlier ~ Block * VisuoSpatialCongruency * NotWorrying +  
##     (1 + Block * VisuoSpatialCongruency | Subject)
##    Data: SRHI
## Control: lmerControl(optimizer = "bobyqa")
## 
## REML criterion at convergence: 28724
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.0761 -0.5741 -0.1281  0.3746  5.9421 
## 
## Random effects:
##  Groups   Name                             Variance Std.Dev. Corr             
##  Subject  (Intercept)                       8974     94.73                    
##           BlockS                            2042     45.18    0.00            
##           VisuoSpatialCongruencyinc         3405     58.35    0.10 -0.44      
##           BlockS:VisuoSpatialCongruencyinc  2171     46.59   -0.25  0.33 -0.54
##  Residual                                  11569    107.56                    
## Number of obs: 2340, groups:  Subject, 33
## 
## Fixed effects:
##                                              Estimate Std. Error       df
## (Intercept)                                  312.9309    43.6057  30.9163
## BlockS                                        11.1986    25.4444  30.9245
## VisuoSpatialCongruencyinc                    110.0922    30.6132  31.1755
## NotWorrying                                    5.0054    20.4790  30.8905
## BlockS:VisuoSpatialCongruencyinc               7.6747    30.9050  31.9594
## BlockS:NotWorrying                            -0.7404    11.9307  30.7044
## VisuoSpatialCongruencyinc:NotWorrying          6.7077    14.3363  30.8330
## BlockS:VisuoSpatialCongruencyinc:NotWorrying -10.3835    14.4537  31.4774
##                                              t value Pr(>|t|)    
## (Intercept)                                    7.176 4.63e-08 ***
## BlockS                                         0.440   0.6629    
## VisuoSpatialCongruencyinc                      3.596   0.0011 ** 
## NotWorrying                                    0.244   0.8085    
## BlockS:VisuoSpatialCongruencyinc               0.248   0.8055    
## BlockS:NotWorrying                            -0.062   0.9509    
## VisuoSpatialCongruencyinc:NotWorrying          0.468   0.6432    
## BlockS:VisuoSpatialCongruencyinc:NotWorrying  -0.718   0.4778    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) BlockS VsSptC NtWrry BlS:VSC BlS:NW VSC:NW
## BlockS      -0.108                                           
## VsSptlCngrn -0.011 -0.140                                    
## NotWorrying -0.920  0.099  0.009                             
## BlckS:VsSpC -0.075 -0.132 -0.584  0.069                      
## BlckS:NtWrr  0.099 -0.921  0.130 -0.107  0.121               
## VsSptlCn:NW  0.010  0.130 -0.920 -0.010  0.536  -0.142       
## BlcS:VSC:NW  0.070  0.121  0.537 -0.076 -0.920  -0.130 -0.583
summary(lmm_model_AR)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: RTNoOutlier ~ Block * VisuoSpatialCongruency * AttentionRegulation +  
##     (1 + Block * VisuoSpatialCongruency | Subject)
##    Data: SRHI
## Control: lmerControl(optimizer = "bobyqa")
## 
## REML criterion at convergence: 28722.3
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.0758 -0.5729 -0.1267  0.3780  5.9422 
## 
## Random effects:
##  Groups   Name                             Variance Std.Dev. Corr             
##  Subject  (Intercept)                       8991     94.82                    
##           BlockS                            2038     45.15    0.00            
##           VisuoSpatialCongruencyinc         3419     58.48    0.10 -0.44      
##           BlockS:VisuoSpatialCongruencyinc  2243     47.36   -0.26  0.33 -0.55
##  Residual                                  11570    107.56                    
## Number of obs: 2340, groups:  Subject, 33
## 
## Fixed effects:
##                                                      Estimate Std. Error
## (Intercept)                                          324.0907    79.0096
## BlockS                                                14.5727    46.0858
## VisuoSpatialCongruencyinc                            100.7414    55.6754
## AttentionRegulation                                   -0.4592    26.1313
## BlockS:VisuoSpatialCongruencyinc                     -16.9415    56.6434
## BlockS:AttentionRegulation                            -1.6260    15.2411
## VisuoSpatialCongruencyinc:AttentionRegulation          7.6263    18.3886
## BlockS:VisuoSpatialCongruencyinc:AttentionRegulation   1.4107    18.6849
##                                                            df t value Pr(>|t|)
## (Intercept)                                           31.0020   4.102 0.000275
## BlockS                                                31.1369   0.316 0.753955
## VisuoSpatialCongruencyinc                             31.7277   1.809 0.079866
## AttentionRegulation                                   31.0080  -0.018 0.986092
## BlockS:VisuoSpatialCongruencyinc                      32.6196  -0.299 0.766769
## BlockS:AttentionRegulation                            31.1315  -0.107 0.915721
## VisuoSpatialCongruencyinc:AttentionRegulation         31.5867   0.415 0.681144
## BlockS:VisuoSpatialCongruencyinc:AttentionRegulation  32.3348   0.076 0.940281
##                                                         
## (Intercept)                                          ***
## BlockS                                                  
## VisuoSpatialCongruencyinc                            .  
## AttentionRegulation                                     
## BlockS:VisuoSpatialCongruencyinc                        
## BlockS:AttentionRegulation                              
## VisuoSpatialCongruencyinc:AttentionRegulation           
## BlockS:VisuoSpatialCongruencyinc:AttentionRegulation    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) BlockS VsSptC AttntR BlS:VSC BlS:AR VSC:AR
## BlockS      -0.109                                           
## VsSptlCngrn -0.008 -0.137                                    
## AttntnRgltn -0.976  0.107  0.008                             
## BlckS:VsSpC -0.078 -0.130 -0.594  0.076                      
## BlckS:AttnR  0.107 -0.976  0.133 -0.110  0.127               
## VsSptlCn:AR  0.008  0.133 -0.976 -0.008  0.580  -0.137       
## BlcS:VSC:AR  0.076  0.127  0.580 -0.078 -0.976  -0.130 -0.594
summary(lmm_model_EA)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: RTNoOutlier ~ Block * VisuoSpatialCongruency * EmotionalAwareness +  
##     (1 + Block * VisuoSpatialCongruency | Subject)
##    Data: SRHI
## Control: lmerControl(optimizer = "bobyqa")
## 
## REML criterion at convergence: 28722.4
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.0732 -0.5708 -0.1271  0.3781  5.9450 
## 
## Random effects:
##  Groups   Name                             Variance Std.Dev. Corr             
##  Subject  (Intercept)                       8943     94.57                    
##           BlockS                            2042     45.19    0.00            
##           VisuoSpatialCongruencyinc         3434     58.60    0.10 -0.44      
##           BlockS:VisuoSpatialCongruencyinc  2230     47.22   -0.25  0.33 -0.55
##  Residual                                  11569    107.56                    
## Number of obs: 2340, groups:  Subject, 33
## 
## Fixed effects:
##                                                     Estimate Std. Error
## (Intercept)                                         360.2162    95.2747
## BlockS                                                8.1817    55.5623
## VisuoSpatialCongruencyinc                           138.2942    66.9204
## EmotionalAwareness                                  -10.4112    26.0393
## BlockS:VisuoSpatialCongruencyinc                    -36.3767    67.4827
## BlockS:EmotionalAwareness                             0.4393    15.1876
## VisuoSpatialCongruencyinc:EmotionalAwareness         -4.1813    18.3125
## BlockS:VisuoSpatialCongruencyinc:EmotionalAwareness   6.5785    18.4754
##                                                           df t value Pr(>|t|)
## (Intercept)                                          30.8980   3.781 0.000672
## BlockS                                               30.6435   0.147 0.883897
## VisuoSpatialCongruencyinc                            30.7128   2.067 0.047297
## EmotionalAwareness                                   30.8946  -0.400 0.692037
## BlockS:VisuoSpatialCongruencyinc                     30.9490  -0.539 0.593707
## BlockS:EmotionalAwareness                            30.6577   0.029 0.977112
## VisuoSpatialCongruencyinc:EmotionalAwareness         30.8438  -0.228 0.820899
## BlockS:VisuoSpatialCongruencyinc:EmotionalAwareness  31.1241   0.356 0.724191
##                                                        
## (Intercept)                                         ***
## BlockS                                                 
## VisuoSpatialCongruencyinc                           *  
## EmotionalAwareness                                     
## BlockS:VisuoSpatialCongruencyinc                       
## BlockS:EmotionalAwareness                              
## VisuoSpatialCongruencyinc:EmotionalAwareness           
## BlockS:VisuoSpatialCongruencyinc:EmotionalAwareness    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) BlockS VsSptC EmtnlA BlS:VSC BlS:EA VSC:EA
## BlockS      -0.108                                           
## VsSptlCngrn -0.010 -0.142                                    
## EmtnlAwrnss -0.984  0.106  0.010                             
## BlckS:VsSpC -0.076 -0.128 -0.587  0.075                      
## BlckS:EmtnA  0.106 -0.984  0.139 -0.108  0.126               
## VsSptlCn:EA  0.010  0.139 -0.984 -0.010  0.578  -0.142       
## BlcS:VSC:EA  0.075  0.126  0.577 -0.076 -0.984  -0.128 -0.588
summary(lmm_model_SR)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: RTNoOutlier ~ Block * VisuoSpatialCongruency * SelfRegulation +  
##     (1 + Block * VisuoSpatialCongruency | Subject)
##    Data: SRHI
## Control: lmerControl(optimizer = "bobyqa")
## 
## REML criterion at convergence: 28723.1
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.0721 -0.5718 -0.1304  0.3798  5.9456 
## 
## Random effects:
##  Groups   Name                             Variance Std.Dev. Corr             
##  Subject  (Intercept)                       8889     94.28                    
##           BlockS                            1849     42.99   -0.03            
##           VisuoSpatialCongruencyinc         3434     58.60    0.10 -0.47      
##           BlockS:VisuoSpatialCongruencyinc  2127     46.12   -0.24  0.43 -0.56
##  Residual                                  11570    107.57                    
## Number of obs: 2340, groups:  Subject, 33
## 
## Fixed effects:
##                                                 Estimate Std. Error      df
## (Intercept)                                      352.367     53.754  30.860
## BlockS                                            49.700     30.507  30.561
## VisuoSpatialCongruencyinc                        128.275     38.522  32.637
## SelfRegulation                                   -10.078     17.353  30.857
## BlockS:VisuoSpatialCongruencyinc                 -43.771     38.653  33.453
## BlockS:SelfRegulation                            -13.573      9.843  30.496
## VisuoSpatialCongruencyinc:SelfRegulation          -1.661     12.389  32.232
## BlockS:VisuoSpatialCongruencyinc:SelfRegulation   10.486     12.423  32.996
##                                                 t value Pr(>|t|)    
## (Intercept)                                       6.555 2.61e-07 ***
## BlockS                                            1.629  0.11355    
## VisuoSpatialCongruencyinc                         3.330  0.00216 ** 
## SelfRegulation                                   -0.581  0.56563    
## BlockS:VisuoSpatialCongruencyinc                 -1.132  0.26551    
## BlockS:SelfRegulation                            -1.379  0.17794    
## VisuoSpatialCongruencyinc:SelfRegulation         -0.134  0.89418    
## BlockS:VisuoSpatialCongruencyinc:SelfRegulation   0.844  0.40473    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) BlockS VsSptC SlfRgl BlS:VSC BlS:SR VSC:SR
## BlockS      -0.137                                           
## VsSptlCngrn -0.010 -0.153                                    
## SelfRegultn -0.949  0.129  0.009                             
## BlckS:VsSpC -0.064 -0.090 -0.602  0.061                      
## BlckS:SlfRg  0.129 -0.949  0.145 -0.137  0.085               
## VsSptlCn:SR  0.009  0.146 -0.950 -0.010  0.571  -0.154       
## BlcS:VSC:SR  0.061  0.086  0.571 -0.065 -0.950  -0.090 -0.600
summary(lmm_model_BL)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: RTNoOutlier ~ Block * VisuoSpatialCongruency * BodyListening +  
##     (1 + Block * VisuoSpatialCongruency | Subject)
##    Data: SRHI
## Control: lmerControl(optimizer = "bobyqa")
## 
## REML criterion at convergence: 28723.6
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.0764 -0.5725 -0.1299  0.3819  5.9418 
## 
## Random effects:
##  Groups   Name                             Variance Std.Dev. Corr             
##  Subject  (Intercept)                       8991     94.82                    
##           BlockS                            2013     44.87    0.00            
##           VisuoSpatialCongruencyinc         3202     56.58    0.11 -0.49      
##           BlockS:VisuoSpatialCongruencyinc  2227     47.19   -0.26  0.34 -0.54
##  Residual                                  11569    107.56                    
## Number of obs: 2340, groups:  Subject, 33
## 
## Fixed effects:
##                                                Estimate Std. Error       df
## (Intercept)                                    320.0419    48.2560  30.9346
## BlockS                                          23.8403    27.9816  30.8506
## VisuoSpatialCongruencyinc                      162.7383    33.2503  31.7091
## BodyListening                                    0.9758    16.4257  30.9020
## BlockS:VisuoSpatialCongruencyinc               -22.9312    34.6160  32.6602
## BlockS:BodyListening                            -5.1181     9.5203  30.7649
## VisuoSpatialCongruencyinc:BodyListening        -14.3621    11.3166  31.6655
## BlockS:VisuoSpatialCongruencyinc:BodyListening   3.7301    11.7696  32.5292
##                                                t value Pr(>|t|)    
## (Intercept)                                      6.632 2.08e-07 ***
## BlockS                                           0.852    0.401    
## VisuoSpatialCongruencyinc                        4.894 2.76e-05 ***
## BodyListening                                    0.059    0.953    
## BlockS:VisuoSpatialCongruencyinc                -0.662    0.512    
## BlockS:BodyListening                            -0.538    0.595    
## VisuoSpatialCongruencyinc:BodyListening         -1.269    0.214    
## BlockS:VisuoSpatialCongruencyinc:BodyListening   0.317    0.753    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) BlockS VsSptC BdyLst BlS:VSC BlS:BL VSC:BL
## BlockS      -0.108                                           
## VsSptlCngrn -0.006 -0.167                                    
## BodyListnng -0.935  0.101  0.005                             
## BlckS:VsSpC -0.079 -0.123 -0.591  0.074                      
## BlckS:BdyLs  0.101 -0.935  0.157 -0.108  0.114               
## VsSptlCn:BL  0.005  0.157 -0.935 -0.005  0.553  -0.168       
## BlcS:VSC:BL  0.074  0.114  0.553 -0.080 -0.936  -0.122 -0.592
summary(lmm_model_T)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: RTNoOutlier ~ Block * VisuoSpatialCongruency * Trusting + (1 +  
##     Block * VisuoSpatialCongruency | Subject)
##    Data: SRHI
## Control: lmerControl(optimizer = "bobyqa")
## 
## REML criterion at convergence: 28717.2
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.0830 -0.5731 -0.1202  0.3654  5.9352 
## 
## Random effects:
##  Groups   Name                             Variance Std.Dev. Corr             
##  Subject  (Intercept)                       7098     84.25                    
##           BlockS                            1971     44.40    0.09            
##           VisuoSpatialCongruencyinc         3378     58.12    0.19 -0.48      
##           BlockS:VisuoSpatialCongruencyinc  2239     47.32   -0.33  0.35 -0.55
##  Residual                                  11569    107.56                    
## Number of obs: 2340, groups:  Subject, 33
## 
## Fixed effects:
##                                           Estimate Std. Error      df t value
## (Intercept)                                492.204     63.129  31.054   7.797
## BlockS                                     -22.500     40.749  31.485  -0.552
## VisuoSpatialCongruencyinc                   89.515     49.317  31.524   1.815
## Trusting                                   -47.250     17.080  31.048  -2.766
## BlockS:VisuoSpatialCongruencyinc             2.468     50.327  32.413   0.049
## BlockS:Trusting                              8.984     11.018  31.403   0.815
## VisuoSpatialCongruencyinc:Trusting           9.409     13.360  31.636   0.704
## BlockS:VisuoSpatialCongruencyinc:Trusting   -4.233     13.614  32.371  -0.311
##                                           Pr(>|t|)    
## (Intercept)                               8.38e-09 ***
## BlockS                                     0.58474    
## VisuoSpatialCongruencyinc                  0.07904 .  
## Trusting                                   0.00946 ** 
## BlockS:VisuoSpatialCongruencyinc           0.96118    
## BlockS:Trusting                            0.42098    
## VisuoSpatialCongruencyinc:Trusting         0.48643    
## BlockS:VisuoSpatialCongruencyinc:Trusting  0.75784    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) BlockS VsSptC Trstng BlS:VSC BlcS:T VsSC:T
## BlockS      -0.053                                           
## VsSptlCngrn  0.050 -0.156                                    
## Trusting    -0.970  0.051 -0.049                             
## BlckS:VsSpC -0.112 -0.129 -0.590  0.108                      
## BlckS:Trstn  0.051 -0.970  0.152 -0.053  0.125               
## VsSptlCng:T -0.049  0.151 -0.970  0.050  0.572  -0.156       
## BlckS:VSC:T  0.108  0.125  0.573 -0.112 -0.970  -0.128 -0.592

Since the models are not singular, we can continue to explore the data through post-hoc comparisons.

# Means of Block * VisuoSpatialCongruency interaction
emmeans_interaction_N <- emmeans(lmm_model_N, ~ Block * VisuoSpatialCongruency| Noticing)
emmeans_interaction_N2 <- emmeans(lmm_model_N, ~ Block * Noticing| VisuoSpatialCongruency)
emmeans_interaction_N3 <- emmeans(lmm_model_N, ~ VisuoSpatialCongruency * Noticing| Block)

emmeans_interaction_ND <- emmeans(lmm_model_ND, ~ Block * VisuoSpatialCongruency| NotDistracting)
emmeans_interaction_ND2 <- emmeans(lmm_model_ND, ~ Block * NotDistracting| VisuoSpatialCongruency)
emmeans_interaction_ND3 <- emmeans(lmm_model_ND, ~ VisuoSpatialCongruency * NotDistracting| Block)

emmeans_interaction_NW <- emmeans(lmm_model_NW, ~ Block * VisuoSpatialCongruency| NotWorrying)
emmeans_interaction_NW2 <- emmeans(lmm_model_NW, ~ Block * NotWorrying| VisuoSpatialCongruency)
emmeans_interaction_NW3 <- emmeans(lmm_model_NW, ~ VisuoSpatialCongruency * NotWorrying| Block)

emmeans_interaction_AR <- emmeans(lmm_model_AR, ~ Block * VisuoSpatialCongruency| AttentionRegulation)
emmeans_interaction_AR2 <- emmeans(lmm_model_AR, ~ Block * AttentionRegulation| VisuoSpatialCongruency)
emmeans_interaction_AR3 <- emmeans(lmm_model_AR, ~ VisuoSpatialCongruency * AttentionRegulation| Block)

emmeans_interaction_EA <- emmeans(lmm_model_EA, ~ Block * VisuoSpatialCongruency| EmotionalAwareness)
emmeans_interaction_EA2 <- emmeans(lmm_model_EA, ~ Block * EmotionalAwareness| VisuoSpatialCongruency)
emmeans_interaction_EA3 <- emmeans(lmm_model_EA, ~ VisuoSpatialCongruency * EmotionalAwareness| Block)

emmeans_interaction_SR <- emmeans(lmm_model_SR, ~ Block * VisuoSpatialCongruency| SelfRegulation)
emmeans_interaction_SR2 <- emmeans(lmm_model_SR, ~ Block * SelfRegulation| VisuoSpatialCongruency)
emmeans_interaction_SR3 <- emmeans(lmm_model_SR, ~ VisuoSpatialCongruency * SelfRegulation| Block)

emmeans_interaction_BL <- emmeans(lmm_model_BL, ~ Block * VisuoSpatialCongruency| BodyListening)
emmeans_interaction_BL2 <- emmeans(lmm_model_BL, ~ Block * BodyListening| VisuoSpatialCongruency)
emmeans_interaction_BL3 <- emmeans(lmm_model_BL, ~ VisuoSpatialCongruency * BodyListening| Block)

emmeans_interaction_T <- emmeans(lmm_model_T, ~ Block * VisuoSpatialCongruency| Trusting)
emmeans_interaction_T2 <- emmeans(lmm_model_T, ~ Block * Trusting| VisuoSpatialCongruency)
emmeans_interaction_T3 <- emmeans(lmm_model_T, ~ VisuoSpatialCongruency * Trusting| Block)

# Means of Block
emmeans_block_N <- emmeans(lmm_model_N, ~ Block| Noticing)
## NOTE: Results may be misleading due to involvement in interactions
emmeans_block_ND <- emmeans(lmm_model_ND, ~ Block| NotDistracting)
## NOTE: Results may be misleading due to involvement in interactions
emmeans_block_NW <- emmeans(lmm_model_NW, ~ Block| NotWorrying)
## NOTE: Results may be misleading due to involvement in interactions
emmeans_block_AR <- emmeans(lmm_model_AR, ~ Block| AttentionRegulation)
## NOTE: Results may be misleading due to involvement in interactions
emmeans_block_EA <- emmeans(lmm_model_EA, ~ Block| EmotionalAwareness)
## NOTE: Results may be misleading due to involvement in interactions
emmeans_block_SR <- emmeans(lmm_model_SR, ~ Block| SelfRegulation)
## NOTE: Results may be misleading due to involvement in interactions
emmeans_block_BL <- emmeans(lmm_model_BL, ~ Block| BodyListening)
## NOTE: Results may be misleading due to involvement in interactions
emmeans_block_T <- emmeans(lmm_model_T, ~ Block| Trusting)
## NOTE: Results may be misleading due to involvement in interactions
# Means of VisuoSpatialCongruency
emmeans_visuo_N <- emmeans(lmm_model_N, ~ VisuoSpatialCongruency| Noticing)
## NOTE: Results may be misleading due to involvement in interactions
emmeans_visuo_ND <- emmeans(lmm_model_ND, ~ VisuoSpatialCongruency| NotDistracting)
## NOTE: Results may be misleading due to involvement in interactions
emmeans_visuo_NW <- emmeans(lmm_model_NW, ~ VisuoSpatialCongruency| NotWorrying)
## NOTE: Results may be misleading due to involvement in interactions
emmeans_visuo_AR <- emmeans(lmm_model_AR, ~ VisuoSpatialCongruency| AttentionRegulation)
## NOTE: Results may be misleading due to involvement in interactions
emmeans_visuo_EA <- emmeans(lmm_model_EA, ~ VisuoSpatialCongruency| EmotionalAwareness)
## NOTE: Results may be misleading due to involvement in interactions
emmeans_visuo_SR <- emmeans(lmm_model_SR, ~ VisuoSpatialCongruency| SelfRegulation)
## NOTE: Results may be misleading due to involvement in interactions
emmeans_visuo_BL <- emmeans(lmm_model_BL, ~ VisuoSpatialCongruency| BodyListening)
## NOTE: Results may be misleading due to involvement in interactions
emmeans_visuo_T <- emmeans(lmm_model_T, ~ VisuoSpatialCongruency| Trusting)
## NOTE: Results may be misleading due to involvement in interactions
#
# Post hoc comparisons of Block * VisuoSpatialCongruency
posthoc_interaction_N <- pairs(emmeans_interaction_N, adjust = "bonferroni")
posthoc_interaction_N2 <- pairs(emmeans_interaction_N2, adjust = "bonferroni")
posthoc_interaction_N3 <- pairs(emmeans_interaction_N3, adjust = "bonferroni")

posthoc_interaction_ND <- pairs(emmeans_interaction_ND, adjust = "bonferroni")
posthoc_interaction_ND2 <- pairs(emmeans_interaction_ND2, adjust = "bonferroni")
posthoc_interaction_ND3 <- pairs(emmeans_interaction_ND3, adjust = "bonferroni")

posthoc_interaction_NW <- pairs(emmeans_interaction_NW, adjust = "bonferroni")
posthoc_interaction_NW2 <- pairs(emmeans_interaction_NW2, adjust = "bonferroni")
posthoc_interaction_NW3 <- pairs(emmeans_interaction_NW3, adjust = "bonferroni")

posthoc_interaction_AR <- pairs(emmeans_interaction_AR, adjust = "bonferroni")
posthoc_interaction_AR2 <- pairs(emmeans_interaction_AR2, adjust = "bonferroni")
posthoc_interaction_AR3 <- pairs(emmeans_interaction_AR3, adjust = "bonferroni")

posthoc_interaction_EA <- pairs(emmeans_interaction_EA, adjust = "bonferroni")
posthoc_interaction_EA2 <- pairs(emmeans_interaction_EA2, adjust = "bonferroni")
posthoc_interaction_EA3 <- pairs(emmeans_interaction_EA3, adjust = "bonferroni")

posthoc_interaction_SR <- pairs(emmeans_interaction_SR, adjust = "bonferroni")
posthoc_interaction_SR2 <- pairs(emmeans_interaction_SR2, adjust = "bonferroni")
posthoc_interaction_SR3 <- pairs(emmeans_interaction_SR3, adjust = "bonferroni")

posthoc_interaction_BL <- pairs(emmeans_interaction_BL, adjust = "bonferroni")
posthoc_interaction_BL2 <- pairs(emmeans_interaction_BL2, adjust = "bonferroni")
posthoc_interaction_BL3 <- pairs(emmeans_interaction_BL3, adjust = "bonferroni")

posthoc_interaction_T <- pairs(emmeans_interaction_T, adjust = "bonferroni")
posthoc_interaction_T2 <- pairs(emmeans_interaction_T2, adjust = "bonferroni")
posthoc_interaction_T3 <- pairs(emmeans_interaction_T3, adjust = "bonferroni")

# Post hoc comparisons of Block 
posthoc_block_N <- contrast(emmeans_block_N, adjust = "bonferroni")
posthoc_block_ND <- contrast(emmeans_block_ND, adjust = "bonferroni")
posthoc_block_NW <- contrast(emmeans_block_NW, adjust = "bonferroni")
posthoc_block_AR <- contrast(emmeans_block_AR, adjust = "bonferroni")
posthoc_block_EA <- contrast(emmeans_block_EA, adjust = "bonferroni")
posthoc_block_SR <- contrast(emmeans_block_SR, adjust = "bonferroni")
posthoc_block_BL <- contrast(emmeans_block_BL, adjust = "bonferroni")
posthoc_block_T <- contrast(emmeans_block_T, adjust = "bonferroni")

# Post hoc comparisons of VisuoSpatialCongruency 
posthoc_visuo_N <- contrast(emmeans_visuo_N, adjust = "bonferroni")
posthoc_visuo_ND <- contrast(emmeans_visuo_ND, adjust = "bonferroni")
posthoc_visuo_NW <- contrast(emmeans_visuo_NW, adjust = "bonferroni")
posthoc_visuo_AR <- contrast(emmeans_visuo_AR, adjust = "bonferroni")
posthoc_visuo_EA <- contrast(emmeans_visuo_EA, adjust = "bonferroni")
posthoc_visuo_SR <- contrast(emmeans_visuo_SR, adjust = "bonferroni")
posthoc_visuo_BL <- contrast(emmeans_visuo_BL, adjust = "bonferroni")
posthoc_visuo_T <- contrast(emmeans_visuo_T, adjust = "bonferroni")


#
#post hoc summary of Block * VisuoSpatialCongruency
summary(posthoc_interaction_N)
## Noticing = 3.37:
##  contrast        estimate    SE   df t.ratio p.value
##  A cong - S cong    -9.66  9.74 31.0  -0.991  1.0000
##  A cong - A inc   -123.29 12.06 30.9 -10.224  <.0001
##  A cong - S inc   -120.23 12.37 31.0  -9.722  <.0001
##  S cong - A inc   -113.63 16.45 31.0  -6.907  <.0001
##  S cong - S inc   -110.58 10.90 30.9 -10.144  <.0001
##  A inc - S inc       3.05 14.62 31.0   0.209  1.0000
## 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 6 tests
summary(posthoc_interaction_N2)
## VisuoSpatialCongruency = cong:
##  contrast                                              estimate    SE df
##  A Noticing3.3715811965812 - S Noticing3.3715811965812    -9.66  9.74 31
##  t.ratio p.value
##   -0.991  0.3292
## 
## VisuoSpatialCongruency = inc:
##  contrast                                              estimate    SE df
##  A Noticing3.3715811965812 - S Noticing3.3715811965812     3.05 14.62 31
##  t.ratio p.value
##    0.209  0.8361
## 
## Degrees-of-freedom method: kenward-roger
summary(posthoc_interaction_N3)
## Block = A:
##  contrast                                                   estimate   SE   df
##  cong Noticing3.3715811965812 - inc Noticing3.3715811965812     -123 12.1 30.9
##  t.ratio p.value
##  -10.224  <.0001
## 
## Block = S:
##  contrast                                                   estimate   SE   df
##  cong Noticing3.3715811965812 - inc Noticing3.3715811965812     -111 10.9 30.9
##  t.ratio p.value
##  -10.144  <.0001
## 
## Degrees-of-freedom method: kenward-roger
summary(posthoc_interaction_ND)
## NotDistracting = 2.02:
##  contrast        estimate    SE   df t.ratio p.value
##  A cong - S cong    -9.71  9.91 31.0  -0.980  1.0000
##  A cong - A inc   -123.32 12.09 30.9 -10.204  <.0001
##  A cong - S inc   -120.01 11.36 31.0 -10.567  <.0001
##  S cong - A inc   -113.62 16.66 31.0  -6.821  <.0001
##  S cong - S inc   -110.30 10.07 30.9 -10.955  <.0001
##  A inc - S inc       3.31 13.81 30.9   0.240  1.0000
## 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 6 tests
summary(posthoc_interaction_ND2)
## VisuoSpatialCongruency = cong:
##  contrast                                                            estimate
##  A NotDistracting2.01509971509972 - S NotDistracting2.01509971509972    -9.71
##     SE   df t.ratio p.value
##   9.91 31.0  -0.980  0.3347
## 
## VisuoSpatialCongruency = inc:
##  contrast                                                            estimate
##  A NotDistracting2.01509971509972 - S NotDistracting2.01509971509972     3.31
##     SE   df t.ratio p.value
##  13.81 30.9   0.240  0.8119
## 
## Degrees-of-freedom method: kenward-roger
summary(posthoc_interaction_ND3)
## Block = A:
##  contrast                                                                
##  cong NotDistracting2.01509971509972 - inc NotDistracting2.01509971509972
##  estimate   SE   df t.ratio p.value
##      -123 12.1 30.9 -10.204  <.0001
## 
## Block = S:
##  contrast                                                                
##  cong NotDistracting2.01509971509972 - inc NotDistracting2.01509971509972
##  estimate   SE   df t.ratio p.value
##      -110 10.1 30.9 -10.955  <.0001
## 
## Degrees-of-freedom method: kenward-roger
summary(posthoc_interaction_NW)
## NotWorrying = 1.97:
##  contrast        estimate    SE   df t.ratio p.value
##  A cong - S cong    -9.74  9.94 31.0  -0.980  1.0000
##  A cong - A inc   -123.30 12.03 30.9 -10.246  <.0001
##  A cong - S inc   -120.27 12.40 31.0  -9.696  <.0001
##  S cong - A inc   -113.56 16.63 30.9  -6.829  <.0001
##  S cong - S inc   -110.53 10.94 30.9 -10.102  <.0001
##  A inc - S inc       3.04 14.64 30.9   0.208  1.0000
## 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 6 tests
summary(posthoc_interaction_NW2)
## VisuoSpatialCongruency = cong:
##  contrast                                                      estimate    SE
##  A NotWorrying1.96980056980057 - S NotWorrying1.96980056980057    -9.74  9.94
##    df t.ratio p.value
##  31.0  -0.980  0.3348
## 
## VisuoSpatialCongruency = inc:
##  contrast                                                      estimate    SE
##  A NotWorrying1.96980056980057 - S NotWorrying1.96980056980057     3.04 14.64
##    df t.ratio p.value
##  30.9   0.208  0.8369
## 
## Degrees-of-freedom method: kenward-roger
summary(posthoc_interaction_NW3)
## Block = A:
##  contrast                                                           estimate
##  cong NotWorrying1.96980056980057 - inc NotWorrying1.96980056980057     -123
##    SE   df t.ratio p.value
##  12.0 30.9 -10.246  <.0001
## 
## Block = S:
##  contrast                                                           estimate
##  cong NotWorrying1.96980056980057 - inc NotWorrying1.96980056980057     -111
##    SE   df t.ratio p.value
##  10.9 30.9 -10.102  <.0001
## 
## Degrees-of-freedom method: kenward-roger
summary(posthoc_interaction_AR)
## AttentionRegulation = 2.96:
##  contrast        estimate    SE   df t.ratio p.value
##  A cong - S cong    -9.76  9.94 31.0  -0.982  1.0000
##  A cong - A inc   -123.33 12.05 30.9 -10.232  <.0001
##  A cong - S inc   -120.32 12.38 31.0  -9.718  <.0001
##  S cong - A inc   -113.57 16.64 31.0  -6.826  <.0001
##  S cong - S inc   -110.56 10.88 30.9 -10.160  <.0001
##  A inc - S inc       3.01 14.73 30.9   0.204  1.0000
## 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 6 tests
summary(posthoc_interaction_AR2)
## VisuoSpatialCongruency = cong:
##  contrast                                                                     
##  A AttentionRegulation2.96129426129426 - S AttentionRegulation2.96129426129426
##  estimate    SE   df t.ratio p.value
##     -9.76  9.94 31.0  -0.982  0.3338
## 
## VisuoSpatialCongruency = inc:
##  contrast                                                                     
##  A AttentionRegulation2.96129426129426 - S AttentionRegulation2.96129426129426
##  estimate    SE   df t.ratio p.value
##      3.01 14.73 30.9   0.204  0.8396
## 
## Degrees-of-freedom method: kenward-roger
summary(posthoc_interaction_AR3)
## Block = A:
##  contrast                                                                          
##  cong AttentionRegulation2.96129426129426 - inc AttentionRegulation2.96129426129426
##  estimate   SE   df t.ratio p.value
##      -123 12.1 30.9 -10.232  <.0001
## 
## Block = S:
##  contrast                                                                          
##  cong AttentionRegulation2.96129426129426 - inc AttentionRegulation2.96129426129426
##  estimate   SE   df t.ratio p.value
##      -111 10.9 30.9 -10.160  <.0001
## 
## Degrees-of-freedom method: kenward-roger
summary(posthoc_interaction_EA)
## EmotionalAwareness = 3.59:
##  contrast        estimate    SE   df t.ratio p.value
##  A cong - S cong    -9.76  9.94 31.0  -0.982  1.0000
##  A cong - A inc   -123.28 12.07 30.9 -10.213  <.0001
##  A cong - S inc   -120.29 12.41 31.0  -9.692  <.0001
##  S cong - A inc   -113.52 16.66 30.9  -6.813  <.0001
##  S cong - S inc   -110.53 10.95 30.9 -10.098  <.0001
##  A inc - S inc       2.99 14.71 30.9   0.203  1.0000
## 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 6 tests
summary(posthoc_interaction_EA2)
## VisuoSpatialCongruency = cong:
##  contrast                                                                   
##  A EmotionalAwareness3.59196581196581 - S EmotionalAwareness3.59196581196581
##  estimate    SE   df t.ratio p.value
##     -9.76  9.94 31.0  -0.982  0.3339
## 
## VisuoSpatialCongruency = inc:
##  contrast                                                                   
##  A EmotionalAwareness3.59196581196581 - S EmotionalAwareness3.59196581196581
##  estimate    SE   df t.ratio p.value
##      2.99 14.71 30.9   0.203  0.8404
## 
## Degrees-of-freedom method: kenward-roger
summary(posthoc_interaction_EA3)
## Block = A:
##  contrast                                                                        
##  cong EmotionalAwareness3.59196581196581 - inc EmotionalAwareness3.59196581196581
##  estimate   SE   df t.ratio p.value
##      -123 12.1 30.9 -10.213  <.0001
## 
## Block = S:
##  contrast                                                                        
##  cong EmotionalAwareness3.59196581196581 - inc EmotionalAwareness3.59196581196581
##  estimate   SE   df t.ratio p.value
##      -111 10.9 30.9 -10.098  <.0001
## 
## Degrees-of-freedom method: kenward-roger
summary(posthoc_interaction_SR)
## SelfRegulation = 2.95:
##  contrast        estimate    SE   df t.ratio p.value
##  A cong - S cong    -9.63  9.64 31.0  -0.998  1.0000
##  A cong - A inc   -123.37 12.07 30.9 -10.221  <.0001
##  A cong - S inc   -120.18 12.38 31.0  -9.711  <.0001
##  S cong - A inc   -113.74 16.54 31.0  -6.877  <.0001
##  S cong - S inc   -110.56 10.82 31.0 -10.220  <.0001
##  A inc - S inc       3.19 14.73 30.9   0.216  1.0000
## 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 6 tests
summary(posthoc_interaction_SR2)
## VisuoSpatialCongruency = cong:
##  contrast                                                            estimate
##  A SelfRegulation2.95235042735043 - S SelfRegulation2.95235042735043    -9.63
##     SE   df t.ratio p.value
##   9.64 31.0  -0.998  0.3259
## 
## VisuoSpatialCongruency = inc:
##  contrast                                                            estimate
##  A SelfRegulation2.95235042735043 - S SelfRegulation2.95235042735043     3.19
##     SE   df t.ratio p.value
##  14.73 30.9   0.216  0.8301
## 
## Degrees-of-freedom method: kenward-roger
summary(posthoc_interaction_SR3)
## Block = A:
##  contrast                                                                
##  cong SelfRegulation2.95235042735043 - inc SelfRegulation2.95235042735043
##  estimate   SE   df t.ratio p.value
##      -123 12.1 30.9 -10.221  <.0001
## 
## Block = S:
##  contrast                                                                
##  cong SelfRegulation2.95235042735043 - inc SelfRegulation2.95235042735043
##  estimate   SE   df t.ratio p.value
##      -111 10.8 31.0 -10.220  <.0001
## 
## Degrees-of-freedom method: kenward-roger
summary(posthoc_interaction_BL)
## BodyListening = 2.75:
##  contrast        estimate   SE   df t.ratio p.value
##  A cong - S cong    -9.75  9.9 31.0  -0.985  1.0000
##  A cong - A inc   -123.19 11.8 30.9 -10.462  <.0001
##  A cong - S inc   -120.28 12.1 31.0  -9.966  <.0001
##  S cong - A inc   -113.44 16.6 31.0  -6.839  <.0001
##  S cong - S inc   -110.53 10.8 31.0 -10.250  <.0001
##  A inc - S inc       2.91 14.7 30.9   0.198  1.0000
## 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 6 tests
summary(posthoc_interaction_BL2)
## VisuoSpatialCongruency = cong:
##  contrast                                                        estimate   SE
##  A BodyListening2.7537037037037 - S BodyListening2.7537037037037    -9.75  9.9
##    df t.ratio p.value
##  31.0  -0.985  0.3324
## 
## VisuoSpatialCongruency = inc:
##  contrast                                                        estimate   SE
##  A BodyListening2.7537037037037 - S BodyListening2.7537037037037     2.91 14.7
##    df t.ratio p.value
##  30.9   0.198  0.8445
## 
## Degrees-of-freedom method: kenward-roger
summary(posthoc_interaction_BL3)
## Block = A:
##  contrast                                                             estimate
##  cong BodyListening2.7537037037037 - inc BodyListening2.7537037037037     -123
##    SE   df t.ratio p.value
##  11.8 30.9 -10.462  <.0001
## 
## Block = S:
##  contrast                                                             estimate
##  cong BodyListening2.7537037037037 - inc BodyListening2.7537037037037     -111
##    SE   df t.ratio p.value
##  10.8 31.0 -10.250  <.0001
## 
## Degrees-of-freedom method: kenward-roger
summary(posthoc_interaction_T)
## Trusting = 3.59:
##  contrast        estimate    SE   df t.ratio p.value
##  A cong - S cong    -9.77  9.83 31.0  -0.993  1.0000
##  A cong - A inc   -123.31 12.00 30.9 -10.276  <.0001
##  A cong - S inc   -120.34 12.20 31.0  -9.863  <.0001
##  S cong - A inc   -113.54 16.67 31.0  -6.810  <.0001
##  S cong - S inc   -110.57 10.91 31.0 -10.139  <.0001
##  A inc - S inc       2.97 14.71 30.9   0.202  1.0000
## 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 6 tests
summary(posthoc_interaction_T2)
## VisuoSpatialCongruency = cong:
##  contrast                                                estimate    SE   df
##  A Trusting3.59173789173789 - S Trusting3.59173789173789    -9.77  9.83 31.0
##  t.ratio p.value
##   -0.993  0.3282
## 
## VisuoSpatialCongruency = inc:
##  contrast                                                estimate    SE   df
##  A Trusting3.59173789173789 - S Trusting3.59173789173789     2.97 14.71 30.9
##  t.ratio p.value
##    0.202  0.8415
## 
## Degrees-of-freedom method: kenward-roger
summary(posthoc_interaction_T3)
## Block = A:
##  contrast                                                     estimate   SE
##  cong Trusting3.59173789173789 - inc Trusting3.59173789173789     -123 12.0
##    df t.ratio p.value
##  30.9 -10.276  <.0001
## 
## Block = S:
##  contrast                                                     estimate   SE
##  cong Trusting3.59173789173789 - inc Trusting3.59173789173789     -111 10.9
##    df t.ratio p.value
##  31.0 -10.139  <.0001
## 
## Degrees-of-freedom method: kenward-roger
#post hoc summary of Block 
summary(posthoc_block_N)
## Noticing = 3.37:
##  contrast estimate   SE df t.ratio p.value
##  A effect    -1.65 5.41 31  -0.305  1.0000
##  S effect     1.65 5.41 31   0.305  1.0000
## 
## Results are averaged over the levels of: VisuoSpatialCongruency 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests
summary(posthoc_block_ND)
## NotDistracting = 2.02:
##  contrast estimate   SE df t.ratio p.value
##  A effect     -1.6 5.29 31  -0.302  1.0000
##  S effect      1.6 5.29 31   0.302  1.0000
## 
## Results are averaged over the levels of: VisuoSpatialCongruency 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests
summary(posthoc_block_NW)
## NotWorrying = 1.97:
##  contrast estimate   SE df t.ratio p.value
##  A effect    -1.68 5.47 31  -0.306  1.0000
##  S effect     1.68 5.47 31   0.306  1.0000
## 
## Results are averaged over the levels of: VisuoSpatialCongruency 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests
summary(posthoc_block_AR)
## AttentionRegulation = 2.96:
##  contrast estimate   SE df t.ratio p.value
##  A effect    -1.69 5.49 31  -0.307  1.0000
##  S effect     1.69 5.49 31   0.307  1.0000
## 
## Results are averaged over the levels of: VisuoSpatialCongruency 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests
summary(posthoc_block_EA)
## EmotionalAwareness = 3.59:
##  contrast estimate   SE df t.ratio p.value
##  A effect    -1.69 5.48 31  -0.309  1.0000
##  S effect     1.69 5.48 31   0.309  1.0000
## 
## Results are averaged over the levels of: VisuoSpatialCongruency 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests
summary(posthoc_block_SR)
## SelfRegulation = 2.95:
##  contrast estimate   SE df t.ratio p.value
##  A effect    -1.61 5.44 31  -0.296  1.0000
##  S effect     1.61 5.44 31   0.296  1.0000
## 
## Results are averaged over the levels of: VisuoSpatialCongruency 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests
summary(posthoc_block_BL)
## BodyListening = 2.75:
##  contrast estimate   SE df t.ratio p.value
##  A effect    -1.71 5.48 31  -0.312  1.0000
##  S effect     1.71 5.48 31   0.312  1.0000
## 
## Results are averaged over the levels of: VisuoSpatialCongruency 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests
summary(posthoc_block_T)
## Trusting = 3.59:
##  contrast estimate   SE df t.ratio p.value
##  A effect     -1.7 5.46 31  -0.311  1.0000
##  S effect      1.7 5.46 31   0.311  1.0000
## 
## Results are averaged over the levels of: VisuoSpatialCongruency 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests
#post hoc summary of VisuoSpatialCongruency
summary(posthoc_visuo_N)
## Noticing = 3.37:
##  contrast    estimate   SE df t.ratio p.value
##  cong effect    -58.5 4.87 31 -12.011  <.0001
##  inc effect      58.5 4.87 31  12.011  <.0001
## 
## Results are averaged over the levels of: Block 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests
summary(posthoc_visuo_ND)
## NotDistracting = 2.02:
##  contrast    estimate   SE df t.ratio p.value
##  cong effect    -58.4 4.78 31 -12.227  <.0001
##  inc effect      58.4 4.78 31  12.227  <.0001
## 
## Results are averaged over the levels of: Block 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests
summary(posthoc_visuo_NW)
## NotWorrying = 1.97:
##  contrast    estimate   SE df t.ratio p.value
##  cong effect    -58.5 4.89 31 -11.966  <.0001
##  inc effect      58.5 4.89 31  11.966  <.0001
## 
## Results are averaged over the levels of: Block 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests
summary(posthoc_visuo_AR)
## AttentionRegulation = 2.96:
##  contrast    estimate   SE df t.ratio p.value
##  cong effect    -58.5 4.86 31 -12.031  <.0001
##  inc effect      58.5 4.86 31  12.031  <.0001
## 
## Results are averaged over the levels of: Block 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests
summary(posthoc_visuo_EA)
## EmotionalAwareness = 3.59:
##  contrast    estimate   SE   df t.ratio p.value
##  cong effect    -58.5 4.89 30.9 -11.963  <.0001
##  inc effect      58.5 4.89 30.9  11.963  <.0001
## 
## Results are averaged over the levels of: Block 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests
summary(posthoc_visuo_SR)
## SelfRegulation = 2.95:
##  contrast    estimate   SE df t.ratio p.value
##  cong effect    -58.5 4.87 31 -12.007  <.0001
##  inc effect      58.5 4.87 31  12.007  <.0001
## 
## Results are averaged over the levels of: Block 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests
summary(posthoc_visuo_BL)
## BodyListening = 2.75:
##  contrast    estimate   SE df t.ratio p.value
##  cong effect    -58.4 4.75 31 -12.301  <.0001
##  inc effect      58.4 4.75 31  12.301  <.0001
## 
## Results are averaged over the levels of: Block 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests
summary(posthoc_visuo_T)
## Trusting = 3.59:
##  contrast    estimate   SE df t.ratio p.value
##  cong effect    -58.5 4.85 31 -12.052  <.0001
##  inc effect      58.5 4.85 31  12.052  <.0001
## 
## Results are averaged over the levels of: Block 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests

#IRI The LInterpersonal Reactivity Index (Davis, 1980; Gilet et al., 2013) is a self-report questionnaire about empathic tendencies. The IRI consists of 28 items on a 5-point Likert scale ranging from 0 (does not describe me well) to 4 (describes me very well). It is divided in 4 dimensions: Perspective Taking, Fantasy, Empatic Concern, and Personal Distress scores, computed by summing the scores every seven items, so that the minimum (0) and maximum (28) score of each dimension is the same. The scoring were preprocessed in a different script. Here we considered the mean scores as covariate for our LMM.

#LMM + IRI dimensions as covariate
lmm_model_PT <- lmer(RTNoOutlier ~ Block * VisuoSpatialCongruency * PerspectiveTaking + (1 + Block * VisuoSpatialCongruency| Subject), control = lmerControl(optimizer = "bobyqa"), data = SRHI)
lmm_model_F <- lmer(RTNoOutlier ~ Block * VisuoSpatialCongruency * Fantasy + (1 + Block * VisuoSpatialCongruency| Subject), control = lmerControl(optimizer = "bobyqa"), data = SRHI)
lmm_model_EC <- lmer(RTNoOutlier ~ Block * VisuoSpatialCongruency * EmpaticConcern + (1 + Block * VisuoSpatialCongruency| Subject), control = lmerControl(optimizer = "bobyqa"), data = SRHI)
lmm_model_PD <- lmer(RTNoOutlier ~ Block * VisuoSpatialCongruency * PersonalDistress + (1 + Block * VisuoSpatialCongruency| Subject), control = lmerControl(optimizer = "bobyqa"), data = SRHI)


#verifysingularity
isSingular(lmm_model_PT)
## [1] FALSE
isSingular(lmm_model_F)
## [1] FALSE
isSingular(lmm_model_EC)
## [1] FALSE
isSingular(lmm_model_PD)
## [1] FALSE
#summary
summary(lmm_model_PT)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: RTNoOutlier ~ Block * VisuoSpatialCongruency * PerspectiveTaking +  
##     (1 + Block * VisuoSpatialCongruency | Subject)
##    Data: SRHI
## Control: lmerControl(optimizer = "bobyqa")
## 
## REML criterion at convergence: 28730.5
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.0852 -0.5724 -0.1232  0.3829  5.9329 
## 
## Random effects:
##  Groups   Name                             Variance Std.Dev. Corr             
##  Subject  (Intercept)                       8669     93.11                    
##           BlockS                            1844     42.94   -0.06            
##           VisuoSpatialCongruencyinc         3373     58.08    0.08 -0.51      
##           BlockS:VisuoSpatialCongruencyinc  2116     46.00   -0.22  0.44 -0.53
##  Residual                                  11570    107.56                    
## Number of obs: 2340, groups:  Subject, 33
## 
## Fixed effects:
##                                                    Estimate Std. Error      df
## (Intercept)                                         417.625     93.033  30.947
## BlockS                                               83.961     53.308  30.548
## VisuoSpatialCongruencyinc                           166.198     65.848  30.711
## PerspectiveTaking                                    -5.789      5.581  30.932
## BlockS:VisuoSpatialCongruencyinc                    -71.917     65.997  30.742
## BlockS:PerspectiveTaking                             -4.525      3.198  30.520
## VisuoSpatialCongruencyinc:PerspectiveTaking          -2.621      3.955  30.816
## BlockS:VisuoSpatialCongruencyinc:PerspectiveTaking    3.613      3.964  30.867
##                                                    t value Pr(>|t|)    
## (Intercept)                                          4.489 9.27e-05 ***
## BlockS                                               1.575    0.126    
## VisuoSpatialCongruencyinc                            2.524    0.017 *  
## PerspectiveTaking                                   -1.037    0.308    
## BlockS:VisuoSpatialCongruencyinc                    -1.090    0.284    
## BlockS:PerspectiveTaking                            -1.415    0.167    
## VisuoSpatialCongruencyinc:PerspectiveTaking         -0.663    0.512    
## BlockS:VisuoSpatialCongruencyinc:PerspectiveTaking   0.912    0.369    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) BlockS VsSptC PrspcT BlS:VSC BlS:PT VSC:PT
## BlockS      -0.162                                           
## VsSptlCngrn -0.030 -0.177                                    
## PrspctvTkng -0.984  0.159  0.030                             
## BlckS:VsSpC -0.051 -0.091 -0.580  0.050                      
## BlckS:PrspT  0.159 -0.984  0.174 -0.162  0.089               
## VsSptlCn:PT  0.030  0.174 -0.983 -0.030  0.571  -0.177       
## BlcS:VSC:PT  0.050  0.089  0.571 -0.051 -0.983  -0.091 -0.581
summary(lmm_model_F)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: RTNoOutlier ~ Block * VisuoSpatialCongruency * Fantasy + (1 +  
##     Block * VisuoSpatialCongruency | Subject)
##    Data: SRHI
## Control: lmerControl(optimizer = "bobyqa")
## 
## REML criterion at convergence: 28733
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.0754 -0.5753 -0.1341  0.3822  5.9424 
## 
## Random effects:
##  Groups   Name                             Variance Std.Dev. Corr             
##  Subject  (Intercept)                       8845     94.05                    
##           BlockS                            1777     42.16    0.05            
##           VisuoSpatialCongruencyinc         3426     58.53    0.09 -0.45      
##           BlockS:VisuoSpatialCongruencyinc  2153     46.40   -0.29  0.44 -0.57
##  Residual                                  11570    107.57                    
## Number of obs: 2340, groups:  Subject, 33
## 
## Fixed effects:
##                                          Estimate Std. Error       df t value
## (Intercept)                              274.7914    70.6189  30.8954   3.891
## BlockS                                    73.6650    39.6965  30.7257   1.856
## VisuoSpatialCongruencyinc                110.1295    50.7239  32.6419   2.171
## Fantasy                                    3.1706     4.5341  30.8947   0.699
## BlockS:VisuoSpatialCongruencyinc         -48.3825    50.8618  33.0587  -0.951
## BlockS:Fantasy                            -4.2235     2.5487  30.7250  -1.657
## VisuoSpatialCongruencyinc:Fantasy          0.8708     3.2544  32.5810   0.268
## BlockS:VisuoSpatialCongruencyinc:Fantasy   2.3489     3.2622  32.9503   0.720
##                                          Pr(>|t|)    
## (Intercept)                              0.000496 ***
## BlockS                                   0.073111 .  
## VisuoSpatialCongruencyinc                0.037293 *  
## Fantasy                                  0.489611    
## BlockS:VisuoSpatialCongruencyinc         0.348379    
## BlockS:Fantasy                           0.107673    
## VisuoSpatialCongruencyinc:Fantasy        0.790721    
## BlockS:VisuoSpatialCongruencyinc:Fantasy 0.476581    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) BlockS VsSptC Fantsy BlS:VSC BlcS:F VsSC:F
## BlockS      -0.076                                           
## VsSptlCngrn -0.013 -0.132                                    
## Fantasy     -0.971  0.074  0.012                             
## BlckS:VsSpC -0.097 -0.093 -0.615  0.095                      
## BlckS:Fntsy  0.074 -0.971  0.128 -0.076  0.090               
## VsSptlCng:F  0.012  0.128 -0.971 -0.013  0.597  -0.132       
## BlckS:VSC:F  0.095  0.090  0.597 -0.097 -0.971  -0.093 -0.614
summary(lmm_model_EC)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: RTNoOutlier ~ Block * VisuoSpatialCongruency * EmpaticConcern +  
##     (1 + Block * VisuoSpatialCongruency | Subject)
##    Data: SRHI
## Control: lmerControl(optimizer = "bobyqa")
## 
## REML criterion at convergence: 28726.9
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.0749 -0.5678 -0.1321  0.3763  5.9429 
## 
## Random effects:
##  Groups   Name                             Variance Std.Dev. Corr             
##  Subject  (Intercept)                       8255     90.85                    
##           BlockS                            1743     41.75   -0.12            
##           VisuoSpatialCongruencyinc         3429     58.56    0.13 -0.45      
##           BlockS:VisuoSpatialCongruencyinc  2219     47.11   -0.29  0.33 -0.55
##  Residual                                  11570    107.56                    
## Number of obs: 2340, groups:  Subject, 33
## 
## Fixed effects:
##                                                 Estimate Std. Error      df
## (Intercept)                                      191.644     83.178  30.867
## BlockS                                           -74.065     48.044  30.656
## VisuoSpatialCongruencyinc                        142.083     60.781  31.015
## EmpaticConcern                                     9.528      5.928  30.876
## BlockS:VisuoSpatialCongruencyinc                 -28.356     61.517  31.727
## BlockS:EmpaticConcern                              6.091      3.423  30.613
## VisuoSpatialCongruencyinc:EmpaticConcern          -1.370      4.332  31.042
## BlockS:VisuoSpatialCongruencyinc:EmpaticConcern    1.136      4.378  31.592
##                                                 t value Pr(>|t|)  
## (Intercept)                                       2.304   0.0281 *
## BlockS                                           -1.542   0.1334  
## VisuoSpatialCongruencyinc                         2.338   0.0260 *
## EmpaticConcern                                    1.607   0.1182  
## BlockS:VisuoSpatialCongruencyinc                 -0.461   0.6480  
## BlockS:EmpaticConcern                             1.780   0.0850 .
## VisuoSpatialCongruencyinc:EmpaticConcern         -0.316   0.7540  
## BlockS:VisuoSpatialCongruencyinc:EmpaticConcern   0.259   0.7970  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) BlockS VsSptC EmptcC BlS:VSC BlS:EC VSC:EC
## BlockS      -0.210                                           
## VsSptlCngrn  0.010 -0.132                                    
## EmpatcCncrn -0.980  0.206 -0.010                             
## BlckS:VsSpC -0.098 -0.148 -0.588  0.096                      
## BlckS:EmptC  0.206 -0.980  0.129 -0.211  0.144               
## VsSptlCn:EC -0.010  0.129 -0.980  0.010  0.576  -0.131       
## BlcS:VSC:EC  0.096  0.145  0.577 -0.098 -0.980  -0.147 -0.589
summary(lmm_model_PD)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: RTNoOutlier ~ Block * VisuoSpatialCongruency * PersonalDistress +  
##     (1 + Block * VisuoSpatialCongruency | Subject)
##    Data: SRHI
## Control: lmerControl(optimizer = "bobyqa")
## 
## REML criterion at convergence: 28730.3
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.0657 -0.5757 -0.1222  0.3779  5.9523 
## 
## Random effects:
##  Groups   Name                             Variance Std.Dev. Corr             
##  Subject  (Intercept)                       8969     94.70                    
##           BlockS                            1720     41.47    0.02            
##           VisuoSpatialCongruencyinc         3417     58.45    0.10 -0.51      
##           BlockS:VisuoSpatialCongruencyinc  2040     45.17   -0.29  0.51 -0.55
##  Residual                                  11570    107.56                    
## Number of obs: 2340, groups:  Subject, 33
## 
## Fixed effects:
##                                                   Estimate Std. Error      df
## (Intercept)                                        341.921     81.413  30.874
## BlockS                                             -71.210     45.023  30.665
## VisuoSpatialCongruencyinc                          104.066     57.525  31.764
## PersonalDistress                                    -1.427      5.930  30.863
## BlockS:VisuoSpatialCongruencyinc                    52.678     57.148  32.586
## BlockS:PersonalDistress                              6.034      3.279  30.653
## VisuoSpatialCongruencyinc:PersonalDistress           1.439      4.198  31.952
## BlockS:VisuoSpatialCongruencyinc:PersonalDistress   -4.883      4.167  32.670
##                                                   t value Pr(>|t|)    
## (Intercept)                                         4.200  0.00021 ***
## BlockS                                             -1.582  0.12400    
## VisuoSpatialCongruencyinc                           1.809  0.07992 .  
## PersonalDistress                                   -0.241  0.81139    
## BlockS:VisuoSpatialCongruencyinc                    0.922  0.36342    
## BlockS:PersonalDistress                             1.840  0.07545 .  
## VisuoSpatialCongruencyinc:PersonalDistress          0.343  0.73406    
## BlockS:VisuoSpatialCongruencyinc:PersonalDistress  -1.172  0.24966    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) BlockS VsSptC PrsnlD BlS:VSC BlS:PD VSC:PD
## BlockS      -0.098                                           
## VsSptlCngrn -0.003 -0.171                                    
## PrsnlDstrss -0.978  0.095  0.003                             
## BlckS:VsSpC -0.093 -0.066 -0.595  0.091                      
## BlckS:PrsnD  0.095 -0.978  0.167 -0.097  0.065               
## VsSptlCn:PD  0.003  0.167 -0.978 -0.003  0.582  -0.171       
## BlcS:VSC:PD  0.091  0.064  0.583 -0.093 -0.978  -0.066 -0.597

Since the models are not singular, we can continue to explore the data through post-hoc comparisons.

# Means of Block * VisuoSpatialCongruency interaction
emmeans_interaction_PT <- emmeans(lmm_model_PT, ~ Block * VisuoSpatialCongruency| PerspectiveTaking)
emmeans_interaction_PT2 <- emmeans(lmm_model_PT, ~ Block * PerspectiveTaking| VisuoSpatialCongruency)
emmeans_interaction_PT3 <- emmeans(lmm_model_PT, ~ VisuoSpatialCongruency * PerspectiveTaking| Block)

emmeans_interaction_F <- emmeans(lmm_model_F, ~ Block * VisuoSpatialCongruency| Fantasy)
emmeans_interaction_F2 <- emmeans(lmm_model_F, ~ Block * Fantasy| VisuoSpatialCongruency)
emmeans_interaction_F3 <- emmeans(lmm_model_F, ~ VisuoSpatialCongruency * Fantasy| Block)

emmeans_interaction_EC <- emmeans(lmm_model_EC, ~ Block * VisuoSpatialCongruency| EmpaticConcern)
emmeans_interaction_EC2 <- emmeans(lmm_model_EC, ~ Block * EmpaticConcern| VisuoSpatialCongruency)
emmeans_interaction_EC3 <- emmeans(lmm_model_EC, ~ VisuoSpatialCongruency * EmpaticConcern| Block)

emmeans_interaction_PD <- emmeans(lmm_model_PD, ~ Block * VisuoSpatialCongruency| PersonalDistress)
emmeans_interaction_PD2 <- emmeans(lmm_model_PD, ~ Block * PersonalDistress| VisuoSpatialCongruency)
emmeans_interaction_PD3 <- emmeans(lmm_model_PD, ~ VisuoSpatialCongruency * PersonalDistress| Block)


# Means of Block
emmeans_block_PT <- emmeans(lmm_model_PT, ~ Block| PerspectiveTaking)
## NOTE: Results may be misleading due to involvement in interactions
emmeans_block_F <- emmeans(lmm_model_F, ~ Block| Fantasy)
## NOTE: Results may be misleading due to involvement in interactions
emmeans_block_EC <- emmeans(lmm_model_EC, ~ Block| EmpaticConcern)
## NOTE: Results may be misleading due to involvement in interactions
emmeans_block_PD <- emmeans(lmm_model_PD, ~ Block| PersonalDistress)
## NOTE: Results may be misleading due to involvement in interactions
# Means of VisuoSpatialCongruency
emmeans_visuo_PT <- emmeans(lmm_model_PT, ~ VisuoSpatialCongruency| PerspectiveTaking)
## NOTE: Results may be misleading due to involvement in interactions
emmeans_visuo_F <- emmeans(lmm_model_F, ~ VisuoSpatialCongruency| Fantasy)
## NOTE: Results may be misleading due to involvement in interactions
emmeans_visuo_EC <- emmeans(lmm_model_EC, ~ VisuoSpatialCongruency| EmpaticConcern)
## NOTE: Results may be misleading due to involvement in interactions
emmeans_visuo_PD <- emmeans(lmm_model_PD, ~ VisuoSpatialCongruency| PersonalDistress)
## NOTE: Results may be misleading due to involvement in interactions
#
# Post hoc comparisons of Block * VisuoSpatialCongruency
posthoc_interaction_PT <- pairs(emmeans_interaction_PT, adjust = "bonferroni")
posthoc_interaction_PT2 <- pairs(emmeans_interaction_PT2, adjust = "bonferroni")
posthoc_interaction_PT3 <- pairs(emmeans_interaction_PT3, adjust = "bonferroni")

posthoc_interaction_F <- pairs(emmeans_interaction_F, adjust = "bonferroni")
posthoc_interaction_F2 <- pairs(emmeans_interaction_F2, adjust = "bonferroni")
posthoc_interaction_F3 <- pairs(emmeans_interaction_F3, adjust = "bonferroni")

posthoc_interaction_EC <- pairs(emmeans_interaction_EC, adjust = "bonferroni")
posthoc_interaction_EC2 <- pairs(emmeans_interaction_EC2, adjust = "bonferroni")
posthoc_interaction_EC3 <- pairs(emmeans_interaction_EC3, adjust = "bonferroni")

posthoc_interaction_PD <- pairs(emmeans_interaction_PD, adjust = "bonferroni")
posthoc_interaction_PD2 <- pairs(emmeans_interaction_PD2, adjust = "bonferroni")
posthoc_interaction_PD3 <- pairs(emmeans_interaction_PD3, adjust = "bonferroni")


# Post hoc comparisons of Block 
posthoc_block_PT <- contrast(emmeans_block_PT, adjust = "bonferroni")
posthoc_block_F <- contrast(emmeans_block_F, adjust = "bonferroni")
posthoc_block_EC <- contrast(emmeans_block_EC, adjust = "bonferroni")
posthoc_block_PD <- contrast(emmeans_block_PD, adjust = "bonferroni")


# Post hoc comparisons of VisuoSpatialCongruency 
posthoc_visuo_PT <- contrast(emmeans_visuo_PT, adjust = "bonferroni")
posthoc_visuo_F <- contrast(emmeans_visuo_F, adjust = "bonferroni")
posthoc_visuo_EC <- contrast(emmeans_visuo_EC, adjust = "bonferroni")
posthoc_visuo_PD <- contrast(emmeans_visuo_PD, adjust = "bonferroni")


#
#post hoc summary of Block * VisuoSpatialCongruency
summary(posthoc_interaction_PT)
## PerspectiveTaking = 16.4:
##  contrast        estimate    SE   df t.ratio p.value
##  A cong - S cong    -9.91  9.64 31.0  -1.028  1.0000
##  A cong - A inc   -123.31 11.99 30.9 -10.281  <.0001
##  A cong - S inc   -120.43 12.26 31.0  -9.823  <.0001
##  S cong - A inc   -113.40 16.64 30.9  -6.813  <.0001
##  S cong - S inc   -110.52 10.94 30.9 -10.106  <.0001
##  A inc - S inc       2.88 14.72 30.9   0.196  1.0000
## 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 6 tests
summary(posthoc_interaction_PT2)
## VisuoSpatialCongruency = cong:
##  contrast                                                                 
##  A PerspectiveTaking16.3649572649573 - S PerspectiveTaking16.3649572649573
##  estimate    SE   df t.ratio p.value
##     -9.91  9.64 31.0  -1.028  0.3119
## 
## VisuoSpatialCongruency = inc:
##  contrast                                                                 
##  A PerspectiveTaking16.3649572649573 - S PerspectiveTaking16.3649572649573
##  estimate    SE   df t.ratio p.value
##      2.88 14.72 30.9   0.196  0.8462
## 
## Degrees-of-freedom method: kenward-roger
summary(posthoc_interaction_PT3)
## Block = A:
##  contrast                                                                      
##  cong PerspectiveTaking16.3649572649573 - inc PerspectiveTaking16.3649572649573
##  estimate   SE   df t.ratio p.value
##      -123 12.0 30.9 -10.281  <.0001
## 
## Block = S:
##  contrast                                                                      
##  cong PerspectiveTaking16.3649572649573 - inc PerspectiveTaking16.3649572649573
##  estimate   SE   df t.ratio p.value
##      -111 10.9 30.9 -10.106  <.0001
## 
## Degrees-of-freedom method: kenward-roger
summary(posthoc_interaction_F)
## Fantasy = 15.1:
##  contrast        estimate    SE   df t.ratio p.value
##  A cong - S cong    -9.76  9.53 31.0  -1.024  1.0000
##  A cong - A inc   -123.31 12.06 30.9 -10.224  <.0001
##  A cong - S inc   -120.22 12.38 31.0  -9.711  <.0001
##  S cong - A inc   -113.55 16.31 31.0  -6.960  <.0001
##  S cong - S inc   -110.47 10.70 30.9 -10.322  <.0001
##  A inc - S inc       3.08 14.67 30.9   0.210  1.0000
## 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 6 tests
summary(posthoc_interaction_F2)
## VisuoSpatialCongruency = cong:
##  contrast                                              estimate    SE   df
##  A Fantasy15.1311965811966 - S Fantasy15.1311965811966    -9.76  9.53 31.0
##  t.ratio p.value
##   -1.024  0.3138
## 
## VisuoSpatialCongruency = inc:
##  contrast                                              estimate    SE   df
##  A Fantasy15.1311965811966 - S Fantasy15.1311965811966     3.08 14.67 30.9
##  t.ratio p.value
##    0.210  0.8350
## 
## Degrees-of-freedom method: kenward-roger
summary(posthoc_interaction_F3)
## Block = A:
##  contrast                                                   estimate   SE   df
##  cong Fantasy15.1311965811966 - inc Fantasy15.1311965811966     -123 12.1 30.9
##  t.ratio p.value
##  -10.224  <.0001
## 
## Block = S:
##  contrast                                                   estimate   SE   df
##  cong Fantasy15.1311965811966 - inc Fantasy15.1311965811966     -110 10.7 30.9
##  t.ratio p.value
##  -10.322  <.0001
## 
## Degrees-of-freedom method: kenward-roger
summary(posthoc_interaction_EC)
## EmpaticConcern = 13.8:
##  contrast        estimate    SE   df t.ratio p.value
##  A cong - S cong    -9.85  9.48 31.0  -1.039  1.0000
##  A cong - A inc   -123.21 12.06 30.9 -10.212  <.0001
##  A cong - S inc   -120.35 12.06 31.0  -9.979  <.0001
##  S cong - A inc   -113.36 16.26 30.9  -6.971  <.0001
##  S cong - S inc   -110.50 10.91 30.9 -10.124  <.0001
##  A inc - S inc       2.86 14.28 30.9   0.201  1.0000
## 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 6 tests
summary(posthoc_interaction_EC2)
## VisuoSpatialCongruency = cong:
##  contrast                                                          estimate
##  A EmpaticConcern13.775641025641 - S EmpaticConcern13.775641025641    -9.85
##     SE   df t.ratio p.value
##   9.48 31.0  -1.039  0.3068
## 
## VisuoSpatialCongruency = inc:
##  contrast                                                          estimate
##  A EmpaticConcern13.775641025641 - S EmpaticConcern13.775641025641     2.86
##     SE   df t.ratio p.value
##  14.28 30.9   0.201  0.8424
## 
## Degrees-of-freedom method: kenward-roger
summary(posthoc_interaction_EC3)
## Block = A:
##  contrast                                                              
##  cong EmpaticConcern13.775641025641 - inc EmpaticConcern13.775641025641
##  estimate   SE   df t.ratio p.value
##      -123 12.1 30.9 -10.212  <.0001
## 
## Block = S:
##  contrast                                                              
##  cong EmpaticConcern13.775641025641 - inc EmpaticConcern13.775641025641
##  estimate   SE   df t.ratio p.value
##      -111 10.9 30.9 -10.124  <.0001
## 
## Degrees-of-freedom method: kenward-roger
summary(posthoc_interaction_PD)
## PersonalDistress = 13.4:
##  contrast        estimate    SE   df t.ratio p.value
##  A cong - S cong    -9.81  9.44 31.0  -1.039  1.0000
##  A cong - A inc   -123.38 12.05 30.9 -10.240  <.0001
##  A cong - S inc   -120.30 12.33 31.0  -9.757  <.0001
##  S cong - A inc   -113.57 16.50 31.0  -6.884  <.0001
##  S cong - S inc   -110.49 10.80 30.9 -10.234  <.0001
##  A inc - S inc       3.08 14.72 30.9   0.209  1.0000
## 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 6 tests
summary(posthoc_interaction_PD2)
## VisuoSpatialCongruency = cong:
##  contrast                                                               
##  A PersonalDistress13.4260683760684 - S PersonalDistress13.4260683760684
##  estimate    SE   df t.ratio p.value
##     -9.81  9.44 31.0  -1.039  0.3068
## 
## VisuoSpatialCongruency = inc:
##  contrast                                                               
##  A PersonalDistress13.4260683760684 - S PersonalDistress13.4260683760684
##  estimate    SE   df t.ratio p.value
##      3.08 14.72 30.9   0.209  0.8355
## 
## Degrees-of-freedom method: kenward-roger
summary(posthoc_interaction_PD3)
## Block = A:
##  contrast                                                                    
##  cong PersonalDistress13.4260683760684 - inc PersonalDistress13.4260683760684
##  estimate   SE   df t.ratio p.value
##      -123 12.0 30.9 -10.240  <.0001
## 
## Block = S:
##  contrast                                                                    
##  cong PersonalDistress13.4260683760684 - inc PersonalDistress13.4260683760684
##  estimate   SE   df t.ratio p.value
##      -110 10.8 30.9 -10.234  <.0001
## 
## Degrees-of-freedom method: kenward-roger
#post hoc summary of Block 
summary(posthoc_block_PT)
## PerspectiveTaking = 16.4:
##  contrast estimate   SE df t.ratio p.value
##  A effect    -1.76 5.44 31  -0.323  1.0000
##  S effect     1.76 5.44 31   0.323  1.0000
## 
## Results are averaged over the levels of: VisuoSpatialCongruency 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests
summary(posthoc_block_F)
## Fantasy = 15.1:
##  contrast estimate   SE df t.ratio p.value
##  A effect    -1.67 5.39 31  -0.309  1.0000
##  S effect     1.67 5.39 31   0.309  1.0000
## 
## Results are averaged over the levels of: VisuoSpatialCongruency 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests
summary(posthoc_block_EC)
## EmpaticConcern = 13.8:
##  contrast estimate   SE df t.ratio p.value
##  A effect    -1.75 5.24 31  -0.333  1.0000
##  S effect     1.75 5.24 31   0.333  1.0000
## 
## Results are averaged over the levels of: VisuoSpatialCongruency 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests
summary(posthoc_block_PD)
## PersonalDistress = 13.4:
##  contrast estimate   SE df t.ratio p.value
##  A effect    -1.68 5.41 31  -0.311  1.0000
##  S effect     1.68 5.41 31   0.311  1.0000
## 
## Results are averaged over the levels of: VisuoSpatialCongruency 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests
#post hoc summary of VisuoSpatialCongruency
summary(posthoc_visuo_PT)
## PerspectiveTaking = 16.4:
##  contrast    estimate   SE   df t.ratio p.value
##  cong effect    -58.5 4.88 30.9 -11.974  <.0001
##  inc effect      58.5 4.88 30.9  11.974  <.0001
## 
## Results are averaged over the levels of: Block 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests
summary(posthoc_visuo_F)
## Fantasy = 15.1:
##  contrast    estimate   SE df t.ratio p.value
##  cong effect    -58.4 4.83 31 -12.099  <.0001
##  inc effect      58.4 4.83 31  12.099  <.0001
## 
## Results are averaged over the levels of: Block 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests
summary(posthoc_visuo_EC)
## EmpaticConcern = 13.8:
##  contrast    estimate   SE df t.ratio p.value
##  cong effect    -58.4 4.88 31 -11.977  <.0001
##  inc effect      58.4 4.88 31  11.977  <.0001
## 
## Results are averaged over the levels of: Block 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests
summary(posthoc_visuo_PD)
## PersonalDistress = 13.4:
##  contrast    estimate   SE df t.ratio p.value
##  cong effect    -58.5 4.88 31 -11.993  <.0001
##  inc effect      58.5 4.88 31  11.993  <.0001
## 
## Results are averaged over the levels of: Block 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests

##Received Touch Participants were asked to self-report about their socio-tactile interactions levels. The question stated “In the last week, how many tactile interactions have you received?” and three possible tactile interactions were presented on a VAS scale from 0 to 100, stating: (1) Intimate Touch (e.g. kissing, cuddling, caressing by partner or close family); (2) Friendly Touch (e.g. hugs from friends or acceptance); (3) Professional Touch (e.g. shaking hands, touching colleagues’ shoulders, touching carers).

Here we considered the scores to each received touch as covariate for our LMM.

#LMM + Received Touch dimensions as covariate
lmm_model_RT1_I <- lmer(RTNoOutlier ~ Block * VisuoSpatialCongruency * RT1_I + (1 + Block * VisuoSpatialCongruency| Subject), control = lmerControl(optimizer = "bobyqa"), data = SRHI)
lmm_model_RT2_F <- lmer(RTNoOutlier ~ Block * VisuoSpatialCongruency * RT2_F + (1 + Block * VisuoSpatialCongruency| Subject), control = lmerControl(optimizer = "bobyqa"), data = SRHI)
## boundary (singular) fit: see help('isSingular')
lmm_model_RT3_P <- lmer(RTNoOutlier ~ Block * VisuoSpatialCongruency * RT3_P + (1 + Block * VisuoSpatialCongruency| Subject), control = lmerControl(optimizer = "bobyqa"), data = SRHI)



#verifysingularity
isSingular(lmm_model_RT1_I)
## [1] FALSE
isSingular(lmm_model_RT2_F)
## [1] TRUE
isSingular(lmm_model_RT3_P)
## [1] FALSE
#summary
summary(lmm_model_RT1_I)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: RTNoOutlier ~ Block * VisuoSpatialCongruency * RT1_I + (1 + Block *  
##     VisuoSpatialCongruency | Subject)
##    Data: SRHI
## Control: lmerControl(optimizer = "bobyqa")
## 
## REML criterion at convergence: 28747.9
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.0790 -0.5700 -0.1267  0.3830  5.9386 
## 
## Random effects:
##  Groups   Name                             Variance Std.Dev. Corr             
##  Subject  (Intercept)                       8757     93.58                    
##           BlockS                            2030     45.05    0.01            
##           VisuoSpatialCongruencyinc         3114     55.80    0.16 -0.48      
##           BlockS:VisuoSpatialCongruencyinc  1632     40.40   -0.40  0.42 -0.48
##  Residual                                  11571    107.57                    
## Number of obs: 2340, groups:  Subject, 33
## 
## Fixed effects:
##                                         Estimate Std. Error        df t value
## (Intercept)                            342.33373   27.86308  30.93872  12.286
## BlockS                                   6.99834   16.39339  30.77716   0.427
## VisuoSpatialCongruencyinc              100.80768   19.17937  31.06641   5.256
## RT1_I                                   -0.49687    0.56173  30.96480  -0.885
## BlockS:VisuoSpatialCongruencyinc        18.20180   18.75098  31.37149   0.971
## BlockS:RT1_I                             0.07122    0.33054  30.82602   0.215
## VisuoSpatialCongruencyinc:RT1_I          0.57376    0.38826  31.59169   1.478
## BlockS:VisuoSpatialCongruencyinc:RT1_I  -0.79138    0.38001  32.01504  -2.083
##                                        Pr(>|t|)    
## (Intercept)                            1.95e-13 ***
## BlockS                                   0.6724    
## VisuoSpatialCongruencyinc              1.02e-05 ***
## RT1_I                                    0.3832    
## BlockS:VisuoSpatialCongruencyinc         0.3391    
## BlockS:RT1_I                             0.8308    
## VisuoSpatialCongruencyinc:RT1_I          0.1494    
## BlockS:VisuoSpatialCongruencyinc:RT1_I   0.0454 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) BlockS VsSptC RT1_I  BlS:VSC BS:RT1 VSC:RT
## BlockS      -0.104                                           
## VsSptlCngrn  0.032 -0.157                                    
## RT1_I       -0.796  0.083 -0.025                             
## BlckS:VsSpC -0.144 -0.119 -0.555  0.114                      
## BlckS:RT1_I  0.083 -0.796  0.125 -0.104  0.095               
## VsSpC:RT1_I -0.025  0.124 -0.794  0.031  0.441  -0.155       
## BS:VSC:RT1_  0.114  0.094  0.441 -0.142 -0.793  -0.119 -0.558
summary(lmm_model_RT2_F)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: RTNoOutlier ~ Block * VisuoSpatialCongruency * RT2_F + (1 + Block *  
##     VisuoSpatialCongruency | Subject)
##    Data: SRHI
## Control: lmerControl(optimizer = "bobyqa")
## 
## REML criterion at convergence: 28735.3
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.1116 -0.5739 -0.1245  0.3899  5.9076 
## 
## Random effects:
##  Groups   Name                             Variance Std.Dev. Corr             
##  Subject  (Intercept)                       8905.2   94.37                    
##           BlockS                             971.3   31.17   -0.10            
##           VisuoSpatialCongruencyinc         3430.1   58.57    0.09 -0.72      
##           BlockS:VisuoSpatialCongruencyinc  1902.7   43.62   -0.23  0.97 -0.57
##  Residual                                  11566.6  107.55                    
## Number of obs: 2340, groups:  Subject, 33
## 
## Fixed effects:
##                                        Estimate Std. Error       df t value
## (Intercept)                            312.6929    25.8338  31.0091  12.104
## BlockS                                 -26.8852    12.4107  39.6803  -2.166
## VisuoSpatialCongruencyinc              117.4639    18.4802  33.2036   6.356
## RT2_F                                    0.3869     0.7506  31.0510   0.515
## BlockS:VisuoSpatialCongruencyinc         9.8432    18.1068  43.7517   0.544
## BlockS:RT2_F                             1.4128     0.3603  39.5987   3.921
## VisuoSpatialCongruencyinc:RT2_F          0.2118     0.5319  32.1515   0.398
## BlockS:VisuoSpatialCongruencyinc:RT2_F  -0.8573     0.5183  41.5728  -1.654
##                                        Pr(>|t|)    
## (Intercept)                            2.77e-13 ***
## BlockS                                  0.03635 *  
## VisuoSpatialCongruencyinc              3.30e-07 ***
## RT2_F                                   0.60992    
## BlockS:VisuoSpatialCongruencyinc        0.58946    
## BlockS:RT2_F                            0.00034 ***
## VisuoSpatialCongruencyinc:RT2_F         0.69307    
## BlockS:VisuoSpatialCongruencyinc:RT2_F  0.10567    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) BlockS VsSptC RT2_F  BlS:VSC BS:RT2 VSC:RT
## BlockS      -0.201                                           
## VsSptlCngrn -0.014 -0.211                                    
## RT2_F       -0.754  0.152  0.011                             
## BlckS:VsSpC -0.051  0.031 -0.606  0.038                      
## BlckS:RT2_F  0.152 -0.754  0.158 -0.203 -0.023               
## VsSpC:RT2_F  0.011  0.159 -0.758 -0.015  0.458  -0.211       
## BS:VSC:RT2_  0.039 -0.023  0.461 -0.051 -0.760   0.032 -0.602
## optimizer (bobyqa) convergence code: 0 (OK)
## boundary (singular) fit: see help('isSingular')
summary(lmm_model_RT3_P)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: RTNoOutlier ~ Block * VisuoSpatialCongruency * RT3_P + (1 + Block *  
##     VisuoSpatialCongruency | Subject)
##    Data: SRHI
## Control: lmerControl(optimizer = "bobyqa")
## 
## REML criterion at convergence: 28742.9
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.0862 -0.5720 -0.1265  0.3833  5.9314 
## 
## Random effects:
##  Groups   Name                             Variance Std.Dev. Corr             
##  Subject  (Intercept)                       8863     94.14                    
##           BlockS                            1944     44.09    0.03            
##           VisuoSpatialCongruencyinc         3278     57.25    0.13 -0.51      
##           BlockS:VisuoSpatialCongruencyinc  2239     47.32   -0.26  0.35 -0.55
##  Residual                                  11571    107.57                    
## Number of obs: 2340, groups:  Subject, 33
## 
## Fixed effects:
##                                        Estimate Std. Error       df t value
## (Intercept)                            329.9241    20.3708  30.9558  16.196
## BlockS                                   3.3736    11.7782  31.0258   0.286
## VisuoSpatialCongruencyinc              115.2004    14.2528  31.5857   8.083
## RT3_P                                   -0.8811     1.3833  31.0955  -0.637
## BlockS:VisuoSpatialCongruencyinc       -11.1553    14.6604  32.2233  -0.761
## BlockS:RT3_P                             0.7832     0.8009  31.3478   0.978
## VisuoSpatialCongruencyinc:RT3_P          0.9825     0.9608  30.9677   1.023
## BlockS:VisuoSpatialCongruencyinc:RT3_P  -0.1954     0.9821  30.8858  -0.199
##                                        Pr(>|t|)    
## (Intercept)                             < 2e-16 ***
## BlockS                                    0.776    
## VisuoSpatialCongruencyinc              3.46e-09 ***
## RT3_P                                     0.529    
## BlockS:VisuoSpatialCongruencyinc          0.452    
## BlockS:RT3_P                              0.336    
## VisuoSpatialCongruencyinc:RT3_P           0.314    
## BlockS:VisuoSpatialCongruencyinc:RT3_P    0.844    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) BlockS VsSptC RT3_P  BlS:VSC BS:RT3 VSC:RT
## BlockS      -0.091                                           
## VsSptlCngrn  0.013 -0.175                                    
## RT3_P       -0.555  0.052 -0.006                             
## BlckS:VsSpC -0.083 -0.127 -0.599  0.045                      
## BlckS:RT3_P  0.052 -0.556  0.095 -0.095  0.072               
## VsSpC:RT3_P -0.006  0.096 -0.554  0.010  0.330  -0.170       
## BS:VSC:RT3_  0.045  0.073  0.332 -0.080 -0.554  -0.132 -0.598

Since one model is singular, hence too complex, we create another model in which we do not consider the “Block * VSC” interaction as random factor, but only the two factors separately.

#LMM revised for Received Frendly Touch 
lmm_model_RT2_F2 <- lmer(RTNoOutlier ~ Block * VisuoSpatialCongruency * RT2_F + (1 + Block + VisuoSpatialCongruency| Subject), control = lmerControl(optimizer = "bobyqa"), data = SRHI)

#singularity and summary
isSingular(lmm_model_RT2_F2)
## [1] FALSE
summary(lmm_model_RT2_F2)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: RTNoOutlier ~ Block * VisuoSpatialCongruency * RT2_F + (1 + Block +  
##     VisuoSpatialCongruency | Subject)
##    Data: SRHI
## Control: lmerControl(optimizer = "bobyqa")
## 
## REML criterion at convergence: 28754.1
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.9268 -0.5722 -0.1273  0.3840  6.1467 
## 
## Random effects:
##  Groups   Name                      Variance Std.Dev. Corr       
##  Subject  (Intercept)                9505     97.49              
##           BlockS                     2677     51.74   -0.26      
##           VisuoSpatialCongruencyinc  2462     49.61    0.04 -0.35
##  Residual                           11681    108.08              
## Number of obs: 2340, groups:  Subject, 33
## 
## Fixed effects:
##                                         Estimate Std. Error        df t value
## (Intercept)                             312.3760    26.6444   31.8957  11.724
## BlockS                                  -26.8401    16.5688   42.8200  -1.620
## VisuoSpatialCongruencyinc               117.4682    16.5288   47.2924   7.107
## RT2_F                                     0.3973     0.7742   31.9347   0.513
## BlockS:VisuoSpatialCongruencyinc         10.2459    13.9406 2258.2133   0.735
## BlockS:RT2_F                              1.4073     0.4811   42.7591   2.925
## VisuoSpatialCongruencyinc:RT2_F           0.2137     0.4752   45.4723   0.450
## BlockS:VisuoSpatialCongruencyinc:RT2_F   -0.8702     0.3959 2250.1712  -2.198
##                                        Pr(>|t|)    
## (Intercept)                            4.23e-13 ***
## BlockS                                  0.11259    
## VisuoSpatialCongruencyinc              5.45e-09 ***
## RT2_F                                   0.61135    
## BlockS:VisuoSpatialCongruencyinc        0.46243    
## BlockS:RT2_F                            0.00549 ** 
## VisuoSpatialCongruencyinc:RT2_F         0.65510    
## BlockS:VisuoSpatialCongruencyinc:RT2_F  0.02807 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) BlockS VsSptC RT2_F  BlS:VSC BS:RT2 VSC:RT
## BlockS      -0.311                                           
## VsSptlCngrn -0.070 -0.070                                    
## RT2_F       -0.754  0.235  0.053                             
## BlckS:VsSpC  0.118 -0.376 -0.435 -0.089                      
## BlckS:RT2_F  0.235 -0.754  0.052 -0.312  0.284               
## VsSpC:RT2_F  0.054  0.052 -0.758 -0.071  0.328  -0.069       
## BS:VSC:RT2_ -0.091  0.290  0.332  0.121 -0.763  -0.384 -0.426

Since the models are now all not singular, we can continue to explore the data through post-hoc comparisons.

# Means of Block * VisuoSpatialCongruency interaction
emmeans_interaction_RT1_I <- emmeans(lmm_model_RT1_I, ~ Block * VisuoSpatialCongruency| RT1_I)
emmeans_interaction_RT1_I2 <- emmeans(lmm_model_RT1_I, ~ Block * RT1_I| VisuoSpatialCongruency)
emmeans_interaction_RT1_I3 <- emmeans(lmm_model_RT1_I, ~ VisuoSpatialCongruency * RT1_I| Block)

emmeans_interaction_RT2_F <- emmeans(lmm_model_RT2_F2, ~ Block * VisuoSpatialCongruency| RT2_F)
emmeans_interaction_RT2_F2 <- emmeans(lmm_model_RT2_F2, ~ Block * RT2_F| VisuoSpatialCongruency)
emmeans_interaction_RT2_F3 <- emmeans(lmm_model_RT2_F2, ~ VisuoSpatialCongruency * RT2_F| Block)

emmeans_interaction_RT3_P <- emmeans(lmm_model_RT3_P, ~ Block * VisuoSpatialCongruency| RT3_P)
emmeans_interaction_RT3_P2 <- emmeans(lmm_model_RT3_P, ~ Block * RT3_P| VisuoSpatialCongruency)
emmeans_interaction_RT3_P3 <- emmeans(lmm_model_RT3_P, ~ VisuoSpatialCongruency * RT3_P| Block)


# Means of Block
emmeans_block_RT1_I <- emmeans(lmm_model_RT1_I, ~ Block| RT1_I)
## NOTE: Results may be misleading due to involvement in interactions
emmeans_block_RT2_F <- emmeans(lmm_model_RT2_F2, ~ Block| RT2_F)
## NOTE: Results may be misleading due to involvement in interactions
emmeans_block_RT3_P <- emmeans(lmm_model_RT3_P, ~ Block| RT3_P)
## NOTE: Results may be misleading due to involvement in interactions
# Means of VisuoSpatialCongruency
emmeans_visuo_RT1_I <- emmeans(lmm_model_RT1_I, ~ VisuoSpatialCongruency| RT1_I)
## NOTE: Results may be misleading due to involvement in interactions
emmeans_visuo_RT2_F <- emmeans(lmm_model_RT2_F2, ~ VisuoSpatialCongruency| RT2_F)
## NOTE: Results may be misleading due to involvement in interactions
emmeans_visuo_RT3_P <- emmeans(lmm_model_RT3_P, ~ VisuoSpatialCongruency| RT3_P)
## NOTE: Results may be misleading due to involvement in interactions
#
# Post hoc comparisons of Block * VisuoSpatialCongruency
posthoc_interaction_RT1_I <- pairs(emmeans_interaction_RT1_I, adjust = "bonferroni")
posthoc_interaction_RT1_I2 <- pairs(emmeans_interaction_RT1_I2, adjust = "bonferroni")
posthoc_interaction_RT1_I3 <- pairs(emmeans_interaction_RT1_I3, adjust = "bonferroni")

posthoc_interaction_RT2_F <- pairs(emmeans_interaction_RT2_F, adjust = "bonferroni")
posthoc_interaction_RT2_F2 <- pairs(emmeans_interaction_RT2_F2, adjust = "bonferroni")
posthoc_interaction_RT2_F3 <- pairs(emmeans_interaction_RT2_F3, adjust = "bonferroni")

posthoc_interaction_RT3_P <- pairs(emmeans_interaction_RT3_P, adjust = "bonferroni")
posthoc_interaction_RT3_P2 <- pairs(emmeans_interaction_RT3_P2, adjust = "bonferroni")
posthoc_interaction_RT3_P3 <- pairs(emmeans_interaction_RT3_P3, adjust = "bonferroni")


# Post hoc comparisons of Block 
posthoc_block_RT1_I <- contrast(emmeans_block_RT1_I, adjust = "bonferroni")
posthoc_block_RT2_F <- contrast(emmeans_block_RT2_F, adjust = "bonferroni")
posthoc_block_RT3_P <- contrast(emmeans_block_RT3_P, adjust = "bonferroni")


# Post hoc comparisons of VisuoSpatialCongruency 
posthoc_visuo_RT1_I <- contrast(emmeans_visuo_RT1_I, adjust = "bonferroni")
posthoc_visuo_RT2_F <- contrast(emmeans_visuo_RT2_F, adjust = "bonferroni")
posthoc_visuo_RT3_P <- contrast(emmeans_visuo_RT3_P, adjust = "bonferroni")


#
#post hoc summary of Block * VisuoSpatialCongruency
summary(posthoc_interaction_RT1_I)
## RT1_I = 39.1:
##  contrast        estimate    SE   df t.ratio p.value
##  A cong - S cong    -9.78  9.92 31.0  -0.986  1.0000
##  A cong - A inc   -123.24 11.66 30.9 -10.570  <.0001
##  A cong - S inc   -120.28 12.38 31.0  -9.714  <.0001
##  S cong - A inc   -113.45 16.44 31.0  -6.899  <.0001
##  S cong - S inc   -110.50 10.86 30.9 -10.171  <.0001
##  A inc - S inc       2.95 14.21 30.9   0.208  1.0000
## 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 6 tests
summary(posthoc_interaction_RT1_I2)
## VisuoSpatialCongruency = cong:
##  contrast                                          estimate    SE   df t.ratio
##  A RT1_I39.0910256410256 - S RT1_I39.0910256410256    -9.78  9.92 31.0  -0.986
##  p.value
##   0.3319
## 
## VisuoSpatialCongruency = inc:
##  contrast                                          estimate    SE   df t.ratio
##  A RT1_I39.0910256410256 - S RT1_I39.0910256410256     2.95 14.21 30.9   0.208
##  p.value
##   0.8369
## 
## Degrees-of-freedom method: kenward-roger
summary(posthoc_interaction_RT1_I3)
## Block = A:
##  contrast                                               estimate   SE   df
##  cong RT1_I39.0910256410256 - inc RT1_I39.0910256410256     -123 11.7 30.9
##  t.ratio p.value
##  -10.570  <.0001
## 
## Block = S:
##  contrast                                               estimate   SE   df
##  cong RT1_I39.0910256410256 - inc RT1_I39.0910256410256     -111 10.9 30.9
##  t.ratio p.value
##  -10.171  <.0001
## 
## Degrees-of-freedom method: kenward-roger
summary(posthoc_interaction_RT2_F)
## RT2_F = 26.6:
##  contrast        estimate   SE   df t.ratio p.value
##  A cong - S cong   -10.55 10.9 42.3  -0.969  1.0000
##  A cong - A inc   -123.15 10.8 46.1 -11.426  <.0001
##  A cong - S inc   -120.82 11.9 31.0 -10.145  <.0001
##  S cong - A inc   -112.59 15.9 31.0  -7.100  <.0001
##  S cong - S inc   -110.27 10.7 45.0 -10.296  <.0001
##  A inc - S inc       2.32 11.2 47.1   0.208  1.0000
## 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 6 tests
summary(posthoc_interaction_RT2_F2)
## VisuoSpatialCongruency = cong:
##  contrast                                          estimate   SE   df t.ratio
##  A RT2_F26.5709401709402 - S RT2_F26.5709401709402   -10.55 10.9 42.3  -0.969
##  p.value
##   0.3379
## 
## VisuoSpatialCongruency = inc:
##  contrast                                          estimate   SE   df t.ratio
##  A RT2_F26.5709401709402 - S RT2_F26.5709401709402     2.32 11.2 47.1   0.208
##  p.value
##   0.8365
## 
## Degrees-of-freedom method: kenward-roger
summary(posthoc_interaction_RT2_F3)
## Block = A:
##  contrast                                               estimate   SE   df
##  cong RT2_F26.5709401709402 - inc RT2_F26.5709401709402     -123 10.8 46.1
##  t.ratio p.value
##  -11.426  <.0001
## 
## Block = S:
##  contrast                                               estimate   SE   df
##  cong RT2_F26.5709401709402 - inc RT2_F26.5709401709402     -110 10.7 45.0
##  t.ratio p.value
##  -10.296  <.0001
## 
## Degrees-of-freedom method: kenward-roger
summary(posthoc_interaction_RT3_P)
## RT3_P = 8.26:
##  contrast        estimate    SE   df t.ratio p.value
##  A cong - S cong    -9.85  9.79 31.0  -1.005  1.0000
##  A cong - A inc   -123.32 11.87 30.9 -10.387  <.0001
##  A cong - S inc   -120.40 11.89 30.9 -10.123  <.0001
##  S cong - A inc   -113.47 16.65 30.9  -6.813  <.0001
##  S cong - S inc   -110.55 10.78 30.9 -10.258  <.0001
##  A inc - S inc       2.92 14.67 30.9   0.199  1.0000
## 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 6 tests
summary(posthoc_interaction_RT3_P2)
## VisuoSpatialCongruency = cong:
##  contrast                                          estimate    SE   df t.ratio
##  A RT3_P8.26367521367521 - S RT3_P8.26367521367521    -9.85  9.79 31.0  -1.005
##  p.value
##   0.3225
## 
## VisuoSpatialCongruency = inc:
##  contrast                                          estimate    SE   df t.ratio
##  A RT3_P8.26367521367521 - S RT3_P8.26367521367521     2.92 14.67 30.9   0.199
##  p.value
##   0.8433
## 
## Degrees-of-freedom method: kenward-roger
summary(posthoc_interaction_RT3_P3)
## Block = A:
##  contrast                                               estimate   SE   df
##  cong RT3_P8.26367521367521 - inc RT3_P8.26367521367521     -123 11.9 30.9
##  t.ratio p.value
##  -10.387  <.0001
## 
## Block = S:
##  contrast                                               estimate   SE   df
##  cong RT3_P8.26367521367521 - inc RT3_P8.26367521367521     -111 10.8 30.9
##  t.ratio p.value
##  -10.258  <.0001
## 
## Degrees-of-freedom method: kenward-roger
#post hoc summary of Block 
summary(posthoc_block_RT1_I)
## RT1_I = 39.1:
##  contrast estimate   SE df t.ratio p.value
##  A effect    -1.71 5.42 31  -0.315  1.0000
##  S effect     1.71 5.42 31   0.315  1.0000
## 
## Results are averaged over the levels of: VisuoSpatialCongruency 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests
summary(posthoc_block_RT2_F)
## RT2_F = 26.6:
##  contrast estimate   SE   df t.ratio p.value
##  A effect    -2.06 5.04 31.1  -0.408  1.0000
##  S effect     2.06 5.04 31.1   0.408  1.0000
## 
## Results are averaged over the levels of: VisuoSpatialCongruency 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests
summary(posthoc_block_RT3_P)
## RT3_P = 8.26:
##  contrast estimate   SE df t.ratio p.value
##  A effect    -1.73 5.44 31  -0.318  1.0000
##  S effect     1.73 5.44 31   0.318  1.0000
## 
## Results are averaged over the levels of: VisuoSpatialCongruency 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests
#post hoc summary of VisuoSpatialCongruency
summary(posthoc_visuo_RT1_I)
## RT1_I = 39.1:
##  contrast    estimate   SE df t.ratio p.value
##  cong effect    -58.4 4.86 31 -12.036  <.0001
##  inc effect      58.4 4.86 31  12.036  <.0001
## 
## Results are averaged over the levels of: Block 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests
summary(posthoc_visuo_RT2_F)
## RT2_F = 26.6:
##  contrast    estimate   SE   df t.ratio p.value
##  cong effect    -58.4 4.88 30.9 -11.969  <.0001
##  inc effect      58.4 4.88 30.9  11.969  <.0001
## 
## Results are averaged over the levels of: Block 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests
summary(posthoc_visuo_RT3_P)
## RT3_P = 8.26:
##  contrast    estimate   SE   df t.ratio p.value
##  cong effect    -58.5 4.78 30.9 -12.242  <.0001
##  inc effect      58.5 4.78 30.9  12.242  <.0001
## 
## Results are averaged over the levels of: Block 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests

##Desired Touch Participants were asked to self-report about their socio-tactile interactions levels. The question stated “In the last week, how many tactile interactions have you desired?” and three possible tactile interactions were presented on a VAS scale from 0 to 100, stating: (1) Intimate Touch (e.g. kissing, cuddling, caressing by partner or close family); (2) Friendly Touch (e.g. hugs from friends or acceptance); (3) Professional Touch (e.g. shaking hands, touching colleagues’ shoulders, touching carers).

Here we considered the scores to each desired touch as covariate for our LMM.

#LMM + Desired Touch scores as covariate
lmm_model_DT1_I <- lmer(RTNoOutlier ~ Block * VisuoSpatialCongruency * DT1_I + (1 + Block * VisuoSpatialCongruency| Subject), control = lmerControl(optimizer = "bobyqa"), data = SRHI)
lmm_model_DT2_F <- lmer(RTNoOutlier ~ Block * VisuoSpatialCongruency * DT2_F + (1 + Block * VisuoSpatialCongruency| Subject), control = lmerControl(optimizer = "bobyqa"), data = SRHI)
lmm_model_DT3_P <- lmer(RTNoOutlier ~ Block * VisuoSpatialCongruency * DT3_P + (1 + Block * VisuoSpatialCongruency| Subject), control = lmerControl(optimizer = "bobyqa"), data = SRHI)



#verifysingularity
isSingular(lmm_model_DT1_I)
## [1] FALSE
isSingular(lmm_model_DT2_F)
## [1] FALSE
isSingular(lmm_model_DT3_P)
## [1] FALSE
#summary
summary(lmm_model_DT1_I)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: RTNoOutlier ~ Block * VisuoSpatialCongruency * DT1_I + (1 + Block *  
##     VisuoSpatialCongruency | Subject)
##    Data: SRHI
## Control: lmerControl(optimizer = "bobyqa")
## 
## REML criterion at convergence: 28745.6
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.0657 -0.5777 -0.1261  0.3785  5.9525 
## 
## Random effects:
##  Groups   Name                             Variance Std.Dev. Corr             
##  Subject  (Intercept)                       8926     94.48                    
##           BlockS                            1470     38.34    0.05            
##           VisuoSpatialCongruencyinc         3409     58.39    0.11 -0.57      
##           BlockS:VisuoSpatialCongruencyinc  1856     43.08   -0.33  0.71 -0.57
##  Residual                                  11569    107.56                    
## Number of obs: 2340, groups:  Subject, 33
## 
## Fixed effects:
##                                        Estimate Std. Error       df t value
## (Intercept)                            336.5984    34.2130  30.9613   9.838
## BlockS                                 -30.8931    18.1981  31.2358  -1.698
## VisuoSpatialCongruencyinc              114.8018    24.3768  32.6021   4.709
## DT1_I                                   -0.2442     0.5244  30.9403  -0.466
## BlockS:VisuoSpatialCongruencyinc        21.6835    23.9303  34.4370   0.906
## BlockS:DT1_I                             0.7168     0.2784  30.9945   2.575
## VisuoSpatialCongruencyinc:DT1_I          0.1456     0.3721  32.1273   0.391
## BlockS:VisuoSpatialCongruencyinc:DT1_I  -0.6019     0.3640  33.5330  -1.654
##                                        Pr(>|t|)    
## (Intercept)                            4.79e-11 ***
## BlockS                                   0.0995 .  
## VisuoSpatialCongruencyinc              4.44e-05 ***
## DT1_I                                    0.6447    
## BlockS:VisuoSpatialCongruencyinc         0.3712    
## BlockS:DT1_I                             0.0150 *  
## VisuoSpatialCongruencyinc:DT1_I          0.6982    
## BlockS:VisuoSpatialCongruencyinc:DT1_I   0.1075    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) BlockS VsSptC DT1_I  BlS:VSC BS:DT1 VSC:DT
## BlockS      -0.082                                           
## VsSptlCngrn  0.000 -0.182                                    
## DT1_I       -0.868  0.071  0.000                             
## BlckS:VsSpC -0.108 -0.017 -0.601  0.094                      
## BlckS:DT1_I  0.071 -0.868  0.158 -0.081  0.014               
## VsSpC:DT1_I  0.000  0.159 -0.870  0.000  0.522  -0.184       
## BS:VSC:DT1_  0.094  0.014  0.524 -0.109 -0.872  -0.015 -0.599
summary(lmm_model_DT2_F)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: RTNoOutlier ~ Block * VisuoSpatialCongruency * DT2_F + (1 + Block *  
##     VisuoSpatialCongruency | Subject)
##    Data: SRHI
## Control: lmerControl(optimizer = "bobyqa")
## 
## REML criterion at convergence: 28742.5
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.0974 -0.5749 -0.1241  0.3855  5.9206 
## 
## Random effects:
##  Groups   Name                             Variance Std.Dev. Corr             
##  Subject  (Intercept)                       8976     94.74                    
##           BlockS                            1259     35.48   -0.01            
##           VisuoSpatialCongruencyinc         3434     58.60    0.10 -0.60      
##           BlockS:VisuoSpatialCongruencyinc  1978     44.47   -0.27  0.73 -0.57
##  Residual                                  11570    107.56                    
## Number of obs: 2340, groups:  Subject, 33
## 
## Fixed effects:
##                                         Estimate Std. Error        df t value
## (Intercept)                            321.41456   27.34017  30.98744  11.756
## BlockS                                 -24.35838   13.92782  31.19601  -1.749
## VisuoSpatialCongruencyinc              119.45849   19.54055  32.93284   6.113
## DT2_F                                    0.03925    0.63212  31.01554   0.062
## BlockS:VisuoSpatialCongruencyinc         7.86364   19.31808  34.05042   0.407
## BlockS:DT2_F                             1.00875    0.32185  31.17250   3.134
## VisuoSpatialCongruencyinc:DT2_F          0.10487    0.44783  31.96951   0.234
## BlockS:VisuoSpatialCongruencyinc:DT2_F  -0.60008    0.44060  32.50824  -1.362
##                                        Pr(>|t|)    
## (Intercept)                            5.91e-13 ***
## BlockS                                  0.09014 .  
## VisuoSpatialCongruencyinc              6.97e-07 ***
## DT2_F                                   0.95089    
## BlockS:VisuoSpatialCongruencyinc        0.68651    
## BlockS:DT2_F                            0.00374 ** 
## VisuoSpatialCongruencyinc:DT2_F         0.81635    
## BlockS:VisuoSpatialCongruencyinc:DT2_F  0.18257    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) BlockS VsSptC DT2_F  BlS:VSC BS:DT2 VSC:DT
## BlockS      -0.131                                           
## VsSptlCngrn -0.006 -0.177                                    
## DT2_F       -0.782  0.103  0.005                             
## BlckS:VsSpC -0.078 -0.022 -0.608  0.061                      
## BlckS:DT2_F  0.103 -0.783  0.138 -0.132  0.018               
## VsSpC:DT2_F  0.005  0.139 -0.787 -0.007  0.478  -0.178       
## BS:VSC:DT2_  0.061  0.018  0.480 -0.078 -0.789  -0.022 -0.604
summary(lmm_model_DT3_P)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: RTNoOutlier ~ Block * VisuoSpatialCongruency * DT3_P + (1 + Block *  
##     VisuoSpatialCongruency | Subject)
##    Data: SRHI
## Control: lmerControl(optimizer = "bobyqa")
## 
## REML criterion at convergence: 28744.1
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.0833 -0.5762 -0.1240  0.3798  5.9341 
## 
## Random effects:
##  Groups   Name                             Variance Std.Dev. Corr             
##  Subject  (Intercept)                       8848     94.06                    
##           BlockS                            1957     44.23    0.03            
##           VisuoSpatialCongruencyinc         3277     57.24    0.13 -0.50      
##           BlockS:VisuoSpatialCongruencyinc  2237     47.30   -0.25  0.33 -0.58
##  Residual                                  11571    107.57                    
## Number of obs: 2340, groups:  Subject, 33
## 
## Fixed effects:
##                                        Estimate Std. Error       df t value
## (Intercept)                            328.4902    18.9814  30.9478  17.306
## BlockS                                   5.2445    11.0022  30.9790   0.477
## VisuoSpatialCongruencyinc              117.1436    13.2709  31.4472   8.827
## DT3_P                                   -0.7200     1.0737  31.0844  -0.671
## BlockS:VisuoSpatialCongruencyinc       -13.7237    13.6502  32.0714  -1.005
## BlockS:DT3_P                             0.5660     0.6235  31.3630   0.908
## VisuoSpatialCongruencyinc:DT3_P          0.7708     0.7519  31.7947   1.025
## BlockS:VisuoSpatialCongruencyinc:DT3_P   0.1106     0.7692  31.7465   0.144
##                                        Pr(>|t|)    
## (Intercept)                             < 2e-16 ***
## BlockS                                    0.637    
## VisuoSpatialCongruencyinc              5.09e-10 ***
## DT3_P                                     0.507    
## BlockS:VisuoSpatialCongruencyinc          0.322    
## BlockS:DT3_P                              0.371    
## VisuoSpatialCongruencyinc:DT3_P           0.313    
## BlockS:VisuoSpatialCongruencyinc:DT3_P    0.887    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) BlockS VsSptC DT3_P  BlS:VSC BS:DT3 VSC:DT
## BlockS      -0.091                                           
## VsSptlCngrn  0.013 -0.173                                    
## DT3_P       -0.452  0.042 -0.005                             
## BlckS:VsSpC -0.075 -0.136 -0.611  0.033                      
## BlckS:DT3_P  0.042 -0.453  0.077 -0.095  0.063               
## VsSpC:DT3_P -0.005  0.077 -0.448  0.010  0.273  -0.167       
## BS:VSC:DT3_  0.033  0.063  0.274 -0.072 -0.448  -0.141 -0.616

Since the models are now all not singular, we can continue to explore the data through post-hoc comparisons.

# Means of Block * VisuoSpatialCongruency interaction
emmeans_interaction_DT1_I <- emmeans(lmm_model_DT1_I, ~ Block * VisuoSpatialCongruency| DT1_I)
emmeans_interaction_DT1_I2 <- emmeans(lmm_model_DT1_I, ~ Block * DT1_I| VisuoSpatialCongruency)
emmeans_interaction_DT1_I3 <- emmeans(lmm_model_DT1_I, ~ VisuoSpatialCongruency * DT1_I| Block)

emmeans_interaction_DT2_F <- emmeans(lmm_model_DT2_F, ~ Block * VisuoSpatialCongruency| DT2_F)
emmeans_interaction_DT2_F2 <- emmeans(lmm_model_DT2_F, ~ Block * DT2_F| VisuoSpatialCongruency)
emmeans_interaction_DT2_F3 <- emmeans(lmm_model_DT2_F, ~ VisuoSpatialCongruency * DT2_F| Block)

emmeans_interaction_DT3_P <- emmeans(lmm_model_DT3_P, ~ Block * VisuoSpatialCongruency| DT3_P)
emmeans_interaction_DT3_P2 <- emmeans(lmm_model_DT3_P, ~ Block * DT3_P| VisuoSpatialCongruency)
emmeans_interaction_DT3_P3 <- emmeans(lmm_model_DT3_P, ~ VisuoSpatialCongruency * DT3_P| Block)


# Means of Block
emmeans_block_DT1_I <- emmeans(lmm_model_DT1_I, ~ Block| DT1_I)
## NOTE: Results may be misleading due to involvement in interactions
emmeans_block_DT2_F <- emmeans(lmm_model_DT2_F, ~ Block| DT2_F)
## NOTE: Results may be misleading due to involvement in interactions
emmeans_block_DT3_P <- emmeans(lmm_model_DT3_P, ~ Block| DT3_P)
## NOTE: Results may be misleading due to involvement in interactions
# Means of VisuoSpatialCongruency
emmeans_visuo_DT1_I <- emmeans(lmm_model_DT1_I, ~ VisuoSpatialCongruency| DT1_I)
## NOTE: Results may be misleading due to involvement in interactions
emmeans_visuo_DT2_F <- emmeans(lmm_model_DT2_F, ~ VisuoSpatialCongruency| DT2_F)
## NOTE: Results may be misleading due to involvement in interactions
emmeans_visuo_DT3_P <- emmeans(lmm_model_DT3_P, ~ VisuoSpatialCongruency| DT3_P)
## NOTE: Results may be misleading due to involvement in interactions
#
# Post hoc comparisons of Block * VisuoSpatialCongruency
posthoc_interaction_DT1_I <- pairs(emmeans_interaction_DT1_I, adjust = "bonferroni")
posthoc_interaction_DT1_I2 <- pairs(emmeans_interaction_DT1_I2, adjust = "bonferroni")
posthoc_interaction_DT1_I3 <- pairs(emmeans_interaction_DT1_I3, adjust = "bonferroni")

posthoc_interaction_DT2_F <- pairs(emmeans_interaction_DT2_F, adjust = "bonferroni")
posthoc_interaction_DT2_F2 <- pairs(emmeans_interaction_DT2_F2, adjust = "bonferroni")
posthoc_interaction_DT2_F3 <- pairs(emmeans_interaction_DT2_F3, adjust = "bonferroni")

posthoc_interaction_DT3_P <- pairs(emmeans_interaction_DT3_P, adjust = "bonferroni")
posthoc_interaction_DT3_P2 <- pairs(emmeans_interaction_DT3_P2, adjust = "bonferroni")
posthoc_interaction_DT3_P3 <- pairs(emmeans_interaction_DT3_P3, adjust = "bonferroni")


# Post hoc comparisons of Block 
posthoc_block_DT1_I <- contrast(emmeans_block_DT1_I, adjust = "bonferroni")
posthoc_block_DT2_F <- contrast(emmeans_block_DT2_F, adjust = "bonferroni")
posthoc_block_DT3_P <- contrast(emmeans_block_DT3_P, adjust = "bonferroni")


# Post hoc comparisons of VisuoSpatialCongruency 
posthoc_visuo_DT1_I <- contrast(emmeans_visuo_DT1_I, adjust = "bonferroni")
posthoc_visuo_DT2_F <- contrast(emmeans_visuo_DT2_F, adjust = "bonferroni")
posthoc_visuo_DT3_P <- contrast(emmeans_visuo_DT3_P, adjust = "bonferroni")


#
#post hoc summary of Block * VisuoSpatialCongruency
summary(posthoc_interaction_DT1_I)
## DT1_I = 57.4:
##  contrast        estimate    SE   df t.ratio p.value
##  A cong - S cong   -10.26  9.03 31.0  -1.137  1.0000
##  A cong - A inc   -123.16 12.04 30.9 -10.230  <.0001
##  A cong - S inc   -120.55 12.31 31.0  -9.790  <.0001
##  S cong - A inc   -112.90 16.32 31.0  -6.918  <.0001
##  S cong - S inc   -110.28 10.63 30.9 -10.370  <.0001
##  A inc - S inc       2.61 14.70 30.9   0.178  1.0000
## 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 6 tests
summary(posthoc_interaction_DT1_I2)
## VisuoSpatialCongruency = cong:
##  contrast                                          estimate    SE   df t.ratio
##  A DT1_I57.4162393162393 - S DT1_I57.4162393162393   -10.26  9.03 31.0  -1.137
##  p.value
##   0.2644
## 
## VisuoSpatialCongruency = inc:
##  contrast                                          estimate    SE   df t.ratio
##  A DT1_I57.4162393162393 - S DT1_I57.4162393162393     2.61 14.70 30.9   0.178
##  p.value
##   0.8599
## 
## Degrees-of-freedom method: kenward-roger
summary(posthoc_interaction_DT1_I3)
## Block = A:
##  contrast                                               estimate   SE   df
##  cong DT1_I57.4162393162393 - inc DT1_I57.4162393162393     -123 12.0 30.9
##  t.ratio p.value
##  -10.230  <.0001
## 
## Block = S:
##  contrast                                               estimate   SE   df
##  cong DT1_I57.4162393162393 - inc DT1_I57.4162393162393     -110 10.6 30.9
##  t.ratio p.value
##  -10.370  <.0001
## 
## Degrees-of-freedom method: kenward-roger
summary(posthoc_interaction_DT2_F)
## DT2_F = 34.6:
##  contrast        estimate    SE   df t.ratio p.value
##  A cong - S cong   -10.56  8.67 31.0  -1.218  1.0000
##  A cong - A inc   -123.09 12.07 30.9 -10.198  <.0001
##  A cong - S inc   -120.74 12.14 30.9  -9.943  <.0001
##  S cong - A inc   -112.53 16.09 30.9  -6.995  <.0001
##  S cong - S inc   -110.18 10.68 30.9 -10.315  <.0001
##  A inc - S inc       2.35 14.58 30.9   0.161  1.0000
## 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 6 tests
summary(posthoc_interaction_DT2_F2)
## VisuoSpatialCongruency = cong:
##  contrast                                          estimate    SE   df t.ratio
##  A DT2_F34.6141025641026 - S DT2_F34.6141025641026   -10.56  8.67 31.0  -1.218
##  p.value
##   0.2324
## 
## VisuoSpatialCongruency = inc:
##  contrast                                          estimate    SE   df t.ratio
##  A DT2_F34.6141025641026 - S DT2_F34.6141025641026     2.35 14.58 30.9   0.161
##  p.value
##   0.8730
## 
## Degrees-of-freedom method: kenward-roger
summary(posthoc_interaction_DT2_F3)
## Block = A:
##  contrast                                               estimate   SE   df
##  cong DT2_F34.6141025641026 - inc DT2_F34.6141025641026     -123 12.1 30.9
##  t.ratio p.value
##  -10.198  <.0001
## 
## Block = S:
##  contrast                                               estimate   SE   df
##  cong DT2_F34.6141025641026 - inc DT2_F34.6141025641026     -110 10.7 30.9
##  t.ratio p.value
##  -10.315  <.0001
## 
## Degrees-of-freedom method: kenward-roger
summary(posthoc_interaction_DT3_P)
## DT3_P = 7.93:
##  contrast        estimate    SE   df t.ratio p.value
##  A cong - S cong    -9.73  9.81 31.0  -0.992  1.0000
##  A cong - A inc   -123.26 11.87 30.9 -10.383  <.0001
##  A cong - S inc   -120.15 11.67 30.9 -10.297  <.0001
##  S cong - A inc   -113.52 16.66 31.0  -6.816  <.0001
##  S cong - S inc   -110.41 10.60 30.9 -10.412  <.0001
##  A inc - S inc       3.11 14.60 30.9   0.213  1.0000
## 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 6 tests
summary(posthoc_interaction_DT3_P2)
## VisuoSpatialCongruency = cong:
##  contrast                                          estimate    SE   df t.ratio
##  A DT3_P7.93333333333333 - S DT3_P7.93333333333333    -9.73  9.81 31.0  -0.992
##  p.value
##   0.3288
## 
## VisuoSpatialCongruency = inc:
##  contrast                                          estimate    SE   df t.ratio
##  A DT3_P7.93333333333333 - S DT3_P7.93333333333333     3.11 14.60 30.9   0.213
##  p.value
##   0.8326
## 
## Degrees-of-freedom method: kenward-roger
summary(posthoc_interaction_DT3_P3)
## Block = A:
##  contrast                                               estimate   SE   df
##  cong DT3_P7.93333333333333 - inc DT3_P7.93333333333333     -123 11.9 30.9
##  t.ratio p.value
##  -10.383  <.0001
## 
## Block = S:
##  contrast                                               estimate   SE   df
##  cong DT3_P7.93333333333333 - inc DT3_P7.93333333333333     -110 10.6 30.9
##  t.ratio p.value
##  -10.412  <.0001
## 
## Degrees-of-freedom method: kenward-roger
#post hoc summary of Block 
summary(posthoc_block_DT1_I)
## DT1_I = 57.4:
##  contrast estimate   SE df t.ratio p.value
##  A effect    -1.91 5.35 31  -0.358  1.0000
##  S effect     1.91 5.35 31   0.358  1.0000
## 
## Results are averaged over the levels of: VisuoSpatialCongruency 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests
summary(posthoc_block_DT2_F)
## DT2_F = 34.6:
##  contrast estimate   SE df t.ratio p.value
##  A effect    -2.05 5.21 31  -0.394  1.0000
##  S effect     2.05 5.21 31   0.394  1.0000
## 
## Results are averaged over the levels of: VisuoSpatialCongruency 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests
summary(posthoc_block_DT3_P)
## DT3_P = 7.93:
##  contrast estimate   SE df t.ratio p.value
##  A effect    -1.66 5.42 31  -0.306  1.0000
##  S effect     1.66 5.42 31   0.306  1.0000
## 
## Results are averaged over the levels of: VisuoSpatialCongruency 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests
#post hoc summary of VisuoSpatialCongruency
summary(posthoc_visuo_DT1_I)
## DT1_I = 57.4:
##  contrast    estimate   SE df t.ratio p.value
##  cong effect    -58.4 4.86 31 -11.999  <.0001
##  inc effect      58.4 4.86 31  11.999  <.0001
## 
## Results are averaged over the levels of: Block 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests
summary(posthoc_visuo_DT2_F)
## DT2_F = 34.6:
##  contrast    estimate   SE   df t.ratio p.value
##  cong effect    -58.3 4.86 30.9 -11.993  <.0001
##  inc effect      58.3 4.86 30.9  11.993  <.0001
## 
## Results are averaged over the levels of: Block 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests
summary(posthoc_visuo_DT3_P)
## DT3_P = 7.93:
##  contrast    estimate   SE df t.ratio p.value
##  cong effect    -58.4 4.73 31 -12.358  <.0001
##  inc effect      58.4 4.73 31  12.358  <.0001
## 
## Results are averaged over the levels of: Block 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests

##Social Interaction Participants were asked to self-report about their social interactions levels. Three question regarding social interaction involvement were presented on a VAS scale from 0 to 100, stating: (1) “How involved were you in social interactions before the pandemic”; (2) “How involved have you been in social interactions in the past week?”; (3) “How much would you like to be involved in social interactions right now?”.

Here we considered the scores to each question as covariate for our LMM.

#LMM + Social Interaction scores as covariate
lmm_model_SI_1 <- lmer(RTNoOutlier ~ Block * VisuoSpatialCongruency * SI_1 + (1 + Block * VisuoSpatialCongruency| Subject), control = lmerControl(optimizer = "bobyqa"), data = SRHI)
lmm_model_SI_2 <- lmer(RTNoOutlier ~ Block * VisuoSpatialCongruency * SI_2 + (1 + Block * VisuoSpatialCongruency| Subject), control = lmerControl(optimizer = "bobyqa"), data = SRHI)
lmm_model_SI_3 <- lmer(RTNoOutlier ~ Block * VisuoSpatialCongruency * SI_3 + (1 + Block * VisuoSpatialCongruency| Subject), control = lmerControl(optimizer = "bobyqa"), data = SRHI)



#verifysingularity
isSingular(lmm_model_SI_1)
## [1] FALSE
isSingular(lmm_model_SI_2)
## [1] FALSE
isSingular(lmm_model_SI_3)
## [1] FALSE
#summary
summary(lmm_model_SI_1)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: RTNoOutlier ~ Block * VisuoSpatialCongruency * SI_1 + (1 + Block *  
##     VisuoSpatialCongruency | Subject)
##    Data: SRHI
## Control: lmerControl(optimizer = "bobyqa")
## 
## REML criterion at convergence: 28749.6
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.0709 -0.5733 -0.1286  0.3779  5.9469 
## 
## Random effects:
##  Groups   Name                             Variance Std.Dev. Corr             
##  Subject  (Intercept)                       8721     93.39                    
##           BlockS                            2031     45.07    0.01            
##           VisuoSpatialCongruencyinc         3430     58.56    0.09 -0.44      
##           BlockS:VisuoSpatialCongruencyinc  1964     44.32   -0.21  0.33 -0.56
##  Residual                                  11570    107.56                    
## Number of obs: 2340, groups:  Subject, 33
## 
## Fixed effects:
##                                        Estimate Std. Error        df t value
## (Intercept)                           291.52638   36.96929  30.95468   7.886
## BlockS                                 15.03051   21.79999  30.82700   0.689
## VisuoSpatialCongruencyinc             114.73008   26.68716  32.43165   4.299
## SI_1                                    0.57030    0.60154  30.94777   0.948
## BlockS:VisuoSpatialCongruencyinc       18.72185   26.17616  32.49892   0.715
## BlockS:SI_1                            -0.09599    0.35483  30.86364  -0.271
## VisuoSpatialCongruencyinc:SI_1          0.15526    0.43393  32.38197   0.358
## BlockS:VisuoSpatialCongruencyinc:SI_1  -0.57563    0.42576  32.46498  -1.352
##                                       Pr(>|t|)    
## (Intercept)                           6.76e-09 ***
## BlockS                                0.495683    
## VisuoSpatialCongruencyinc             0.000147 ***
## SI_1                                  0.350441    
## BlockS:VisuoSpatialCongruencyinc      0.479577    
## BlockS:SI_1                           0.788563    
## VisuoSpatialCongruencyinc:SI_1        0.722811    
## BlockS:VisuoSpatialCongruencyinc:SI_1 0.185722    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) BlockS VsSptC SI_1   BlS:VSC BS:SI_ VSC:SI
## BlockS      -0.103                                           
## VsSptlCngrn -0.019 -0.135                                    
## SI_1        -0.891  0.091  0.017                             
## BlckS:VsSpC -0.040 -0.142 -0.606  0.036                      
## BlockS:SI_1  0.091 -0.890  0.121 -0.102  0.126               
## VsSptC:SI_1  0.017  0.121 -0.892 -0.019  0.541  -0.136       
## BS:VSC:SI_1  0.036  0.126  0.541 -0.040 -0.891  -0.142 -0.605
summary(lmm_model_SI_2)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: RTNoOutlier ~ Block * VisuoSpatialCongruency * SI_2 + (1 + Block *  
##     VisuoSpatialCongruency | Subject)
##    Data: SRHI
## Control: lmerControl(optimizer = "bobyqa")
## 
## REML criterion at convergence: 28744.8
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.0797 -0.5677 -0.1297  0.3789  5.9390 
## 
## Random effects:
##  Groups   Name                             Variance Std.Dev. Corr             
##  Subject  (Intercept)                       8988     94.81                    
##           BlockS                            1930     43.93    0.00            
##           VisuoSpatialCongruencyinc         3348     57.86    0.09 -0.49      
##           BlockS:VisuoSpatialCongruencyinc  1371     37.03   -0.30  0.62 -0.58
##  Residual                                  11568    107.55                    
## Number of obs: 2340, groups:  Subject, 33
## 
## Fixed effects:
##                                        Estimate Std. Error        df t value
## (Intercept)                           319.92868   39.13572  31.01549   8.175
## BlockS                                -10.96131   22.43196  31.03162  -0.489
## VisuoSpatialCongruencyinc             107.03476   27.40002  31.69557   3.906
## SI_2                                    0.05128    0.63706  30.98981   0.081
## BlockS:VisuoSpatialCongruencyinc       46.84145   25.42120  32.72173   1.843
## BlockS:SI_2                             0.37406    0.36468  30.85401   1.026
## VisuoSpatialCongruencyinc:SI_2          0.29846    0.44777  32.05035   0.667
## BlockS:VisuoSpatialCongruencyinc:SI_2  -1.08174    0.41456  32.80940  -2.609
##                                       Pr(>|t|)    
## (Intercept)                            3.1e-09 ***
## BlockS                                0.628527    
## VisuoSpatialCongruencyinc             0.000461 ***
## SI_2                                  0.936356    
## BlockS:VisuoSpatialCongruencyinc      0.074462 .  
## BlockS:SI_2                           0.312996    
## VisuoSpatialCongruencyinc:SI_2        0.509827    
## BlockS:VisuoSpatialCongruencyinc:SI_2 0.013558 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) BlockS VsSptC SI_2   BlS:VSC BS:SI_ VSC:SI
## BlockS      -0.116                                           
## VsSptlCngrn -0.016 -0.163                                    
## SI_2        -0.900  0.104  0.014                             
## BlckS:VsSpC -0.071 -0.059 -0.597  0.064                      
## BlockS:SI_2  0.104 -0.900  0.147 -0.115  0.053               
## VsSptC:SI_2  0.014  0.146 -0.900 -0.015  0.539  -0.164       
## BS:VSC:SI_2  0.064  0.053  0.540 -0.071 -0.900  -0.057 -0.602
summary(lmm_model_SI_3)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: RTNoOutlier ~ Block * VisuoSpatialCongruency * SI_3 + (1 + Block *  
##     VisuoSpatialCongruency | Subject)
##    Data: SRHI
## Control: lmerControl(optimizer = "bobyqa")
## 
## REML criterion at convergence: 28747.8
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.0822 -0.5784 -0.1177  0.3790  5.9359 
## 
## Random effects:
##  Groups   Name                             Variance Std.Dev. Corr             
##  Subject  (Intercept)                       8800     93.81                    
##           BlockS                            1776     42.14   -0.06            
##           VisuoSpatialCongruencyinc         3434     58.60    0.10 -0.48      
##           BlockS:VisuoSpatialCongruencyinc  2152     46.39   -0.23  0.44 -0.56
##  Residual                                  11569    107.56                    
## Number of obs: 2340, groups:  Subject, 33
## 
## Fixed effects:
##                                        Estimate Std. Error        df t value
## (Intercept)                           293.27443   41.15387  31.00987   7.126
## BlockS                                -25.65543   23.23724  31.06243  -1.104
## VisuoSpatialCongruencyinc             118.86422   29.68326  32.98933   4.004
## SI_3                                    0.52738    0.67067  30.98321   0.786
## BlockS:VisuoSpatialCongruencyinc        9.50294   29.77659  33.61382   0.319
## BlockS:SI_3                             0.63217    0.37822  30.88655   1.671
## VisuoSpatialCongruencyinc:SI_3          0.07794    0.48360  32.88780   0.161
## BlockS:VisuoSpatialCongruencyinc:SI_3  -0.39644    0.48437  33.36096  -0.818
##                                       Pr(>|t|)    
## (Intercept)                           5.22e-08 ***
## BlockS                                0.278044    
## VisuoSpatialCongruencyinc             0.000332 ***
## SI_3                                  0.437636    
## BlockS:VisuoSpatialCongruencyinc      0.751594    
## BlockS:SI_3                           0.104736    
## VisuoSpatialCongruencyinc:SI_3        0.872943    
## BlockS:VisuoSpatialCongruencyinc:SI_3 0.418904    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) BlockS VsSptC SI_3   BlS:VSC BS:SI_ VSC:SI
## BlockS      -0.159                                           
## VsSptlCngrn -0.013 -0.148                                    
## SI_3        -0.912  0.145  0.012                             
## BlckS:VsSpC -0.056 -0.096 -0.605  0.051                      
## BlockS:SI_3  0.145 -0.912  0.135 -0.159  0.086               
## VsSptC:SI_3  0.012  0.135 -0.914 -0.012  0.553  -0.149       
## BS:VSC:SI_3  0.051  0.086  0.554 -0.057 -0.914  -0.094 -0.606

Since the models are not singular, we can continue to explore the data through post-hoc comparisons.

# Means of Block * VisuoSpatialCongruency interaction
emmeans_interaction_SI_1 <- emmeans(lmm_model_SI_1, ~ Block * VisuoSpatialCongruency| SI_1)
emmeans_interaction_SI_12 <- emmeans(lmm_model_SI_1, ~ Block * SI_1| VisuoSpatialCongruency)
emmeans_interaction_SI_13 <- emmeans(lmm_model_SI_1, ~ VisuoSpatialCongruency * SI_1| Block)

emmeans_interaction_SI_2 <- emmeans(lmm_model_SI_2, ~ Block * VisuoSpatialCongruency| SI_2)
emmeans_interaction_SI_22 <- emmeans(lmm_model_SI_2, ~ Block * SI_2| VisuoSpatialCongruency)
emmeans_interaction_SI_23 <- emmeans(lmm_model_SI_2, ~ VisuoSpatialCongruency * SI_2| Block)

emmeans_interaction_SI_3 <- emmeans(lmm_model_SI_3, ~ Block * VisuoSpatialCongruency| SI_3)
emmeans_interaction_SI_32 <- emmeans(lmm_model_SI_3, ~ Block * SI_3| VisuoSpatialCongruency)
emmeans_interaction_SI_33 <- emmeans(lmm_model_SI_3, ~ VisuoSpatialCongruency * SI_3| Block)


# Means of Block
emmeans_block_SI_1 <- emmeans(lmm_model_SI_1, ~ Block| SI_1)
## NOTE: Results may be misleading due to involvement in interactions
emmeans_block_SI_2 <- emmeans(lmm_model_SI_2, ~ Block| SI_2)
## NOTE: Results may be misleading due to involvement in interactions
emmeans_block_SI_3 <- emmeans(lmm_model_SI_3, ~ Block| SI_3)
## NOTE: Results may be misleading due to involvement in interactions
# Means of VisuoSpatialCongruency
emmeans_visuo_SI_1 <- emmeans(lmm_model_SI_1, ~ VisuoSpatialCongruency| SI_1)
## NOTE: Results may be misleading due to involvement in interactions
emmeans_visuo_SI_2 <- emmeans(lmm_model_SI_2, ~ VisuoSpatialCongruency| SI_2)
## NOTE: Results may be misleading due to involvement in interactions
emmeans_visuo_SI_3 <- emmeans(lmm_model_SI_3, ~ VisuoSpatialCongruency| SI_3)
## NOTE: Results may be misleading due to involvement in interactions
#
# Post hoc comparisons of Block * VisuoSpatialCongruency
posthoc_interaction_SI_1 <- pairs(emmeans_interaction_SI_1, adjust = "bonferroni")
posthoc_interaction_SI_12 <- pairs(emmeans_interaction_SI_12, adjust = "bonferroni")
posthoc_interaction_SI_13 <- pairs(emmeans_interaction_SI_13, adjust = "bonferroni")

posthoc_interaction_SI_2 <- pairs(emmeans_interaction_SI_2, adjust = "bonferroni")
posthoc_interaction_SI_22 <- pairs(emmeans_interaction_SI_22, adjust = "bonferroni")
posthoc_interaction_SI_23 <- pairs(emmeans_interaction_SI_23, adjust = "bonferroni")

posthoc_interaction_SI_3 <- pairs(emmeans_interaction_SI_3, adjust = "bonferroni")
posthoc_interaction_SI_32 <- pairs(emmeans_interaction_SI_32, adjust = "bonferroni")
posthoc_interaction_SI_33 <- pairs(emmeans_interaction_SI_33, adjust = "bonferroni")


# Post hoc comparisons of Block 
posthoc_block_SI_1 <- contrast(emmeans_block_SI_1, adjust = "bonferroni")
posthoc_block_SI_2 <- contrast(emmeans_block_SI_2, adjust = "bonferroni")
posthoc_block_SI_3 <- contrast(emmeans_block_SI_3, adjust = "bonferroni")


# Post hoc comparisons of VisuoSpatialCongruency 
posthoc_visuo_SI_1 <- contrast(emmeans_visuo_SI_1, adjust = "bonferroni")
posthoc_visuo_SI_2 <- contrast(emmeans_visuo_SI_2, adjust = "bonferroni")
posthoc_visuo_SI_3 <- contrast(emmeans_visuo_SI_3, adjust = "bonferroni")


#
#post hoc summary of Block * VisuoSpatialCongruency
summary(posthoc_interaction_SI_1)
## SI_1 = 54.7:
##  contrast        estimate    SE   df t.ratio p.value
##  A cong - S cong    -9.78  9.93 31.0  -0.986  1.0000
##  A cong - A inc   -123.22 12.06 30.9 -10.213  <.0001
##  A cong - S inc   -120.26 12.12 31.0  -9.918  <.0001
##  S cong - A inc   -113.43 16.63 31.0  -6.820  <.0001
##  S cong - S inc   -110.47 10.72 30.9 -10.309  <.0001
##  A inc - S inc       2.96 14.34 30.9   0.207  1.0000
## 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 6 tests
summary(posthoc_interaction_SI_12)
## VisuoSpatialCongruency = cong:
##  contrast                                        estimate    SE   df t.ratio
##  A SI_154.6649572649573 - S SI_154.6649572649573    -9.78  9.93 31.0  -0.986
##  p.value
##   0.3320
## 
## VisuoSpatialCongruency = inc:
##  contrast                                        estimate    SE   df t.ratio
##  A SI_154.6649572649573 - S SI_154.6649572649573     2.96 14.34 30.9   0.207
##  p.value
##   0.8377
## 
## Degrees-of-freedom method: kenward-roger
summary(posthoc_interaction_SI_13)
## Block = A:
##  contrast                                             estimate   SE   df
##  cong SI_154.6649572649573 - inc SI_154.6649572649573     -123 12.1 30.9
##  t.ratio p.value
##  -10.213  <.0001
## 
## Block = S:
##  contrast                                             estimate   SE   df
##  cong SI_154.6649572649573 - inc SI_154.6649572649573     -110 10.7 30.9
##  t.ratio p.value
##  -10.309  <.0001
## 
## Degrees-of-freedom method: kenward-roger
summary(posthoc_interaction_SI_2)
## SI_2 = 55.4:
##  contrast        estimate    SE   df t.ratio p.value
##  A cong - S cong    -9.77  9.77 31.0  -1.000  1.0000
##  A cong - A inc   -123.57 11.96 30.9 -10.332  <.0001
##  A cong - S inc   -120.24 12.31 31.0  -9.770  <.0001
##  S cong - A inc   -113.81 16.65 31.0  -6.836  <.0001
##  S cong - S inc   -110.47 10.35 30.9 -10.674  <.0001
##  A inc - S inc       3.33 14.35 30.9   0.232  1.0000
## 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 6 tests
summary(posthoc_interaction_SI_22)
## VisuoSpatialCongruency = cong:
##  contrast                                        estimate    SE   df t.ratio
##  A SI_255.4115384615385 - S SI_255.4115384615385    -9.77  9.77 31.0  -1.000
##  p.value
##   0.3253
## 
## VisuoSpatialCongruency = inc:
##  contrast                                        estimate    SE   df t.ratio
##  A SI_255.4115384615385 - S SI_255.4115384615385     3.33 14.35 30.9   0.232
##  p.value
##   0.8178
## 
## Degrees-of-freedom method: kenward-roger
summary(posthoc_interaction_SI_23)
## Block = A:
##  contrast                                             estimate   SE   df
##  cong SI_255.4115384615385 - inc SI_255.4115384615385     -124 12.0 30.9
##  t.ratio p.value
##  -10.332  <.0001
## 
## Block = S:
##  contrast                                             estimate   SE   df
##  cong SI_255.4115384615385 - inc SI_255.4115384615385     -110 10.3 30.9
##  t.ratio p.value
##  -10.674  <.0001
## 
## Degrees-of-freedom method: kenward-roger
summary(posthoc_interaction_SI_3)
## SI_3 = 56.3:
##  contrast        estimate    SE   df t.ratio p.value
##  A cong - S cong    -9.92  9.53 31.0  -1.041  1.0000
##  A cong - A inc   -123.25 12.07 30.9 -10.211  <.0001
##  A cong - S inc   -120.36 12.32 31.0  -9.772  <.0001
##  S cong - A inc   -113.33 16.47 31.0  -6.880  <.0001
##  S cong - S inc   -110.45 10.84 30.9 -10.185  <.0001
##  A inc - S inc       2.89 14.68 30.9   0.197  1.0000
## 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 6 tests
summary(posthoc_interaction_SI_32)
## VisuoSpatialCongruency = cong:
##  contrast                                        estimate    SE   df t.ratio
##  A SI_356.2675213675214 - S SI_356.2675213675214    -9.92  9.53 31.0  -1.041
##  p.value
##   0.3061
## 
## VisuoSpatialCongruency = inc:
##  contrast                                        estimate    SE   df t.ratio
##  A SI_356.2675213675214 - S SI_356.2675213675214     2.89 14.68 30.9   0.197
##  p.value
##   0.8453
## 
## Degrees-of-freedom method: kenward-roger
summary(posthoc_interaction_SI_33)
## Block = A:
##  contrast                                             estimate   SE   df
##  cong SI_356.2675213675214 - inc SI_356.2675213675214     -123 12.1 30.9
##  t.ratio p.value
##  -10.211  <.0001
## 
## Block = S:
##  contrast                                             estimate   SE   df
##  cong SI_356.2675213675214 - inc SI_356.2675213675214     -110 10.8 30.9
##  t.ratio p.value
##  -10.185  <.0001
## 
## Degrees-of-freedom method: kenward-roger
#post hoc summary of Block 
summary(posthoc_block_SI_1)
## SI_1 = 54.7:
##  contrast estimate  SE df t.ratio p.value
##  A effect    -1.71 5.4 31  -0.316  1.0000
##  S effect     1.71 5.4 31   0.316  1.0000
## 
## Results are averaged over the levels of: VisuoSpatialCongruency 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests
summary(posthoc_block_SI_2)
## SI_2 = 55.4:
##  contrast estimate   SE df t.ratio p.value
##  A effect    -1.61 5.48 31  -0.294  1.0000
##  S effect     1.61 5.48 31   0.294  1.0000
## 
## Results are averaged over the levels of: VisuoSpatialCongruency 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests
summary(posthoc_block_SI_3)
## SI_3 = 56.3:
##  contrast estimate  SE df t.ratio p.value
##  A effect    -1.76 5.4 31  -0.325  1.0000
##  S effect     1.76 5.4 31   0.325  1.0000
## 
## Results are averaged over the levels of: VisuoSpatialCongruency 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests
#post hoc summary of VisuoSpatialCongruency
summary(posthoc_visuo_SI_1)
## SI_1 = 54.7:
##  contrast    estimate   SE df t.ratio p.value
##  cong effect    -58.4 4.87 31 -11.990  <.0001
##  inc effect      58.4 4.87 31  11.990  <.0001
## 
## Results are averaged over the levels of: Block 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests
summary(posthoc_visuo_SI_2)
## SI_2 = 55.4:
##  contrast    estimate   SE df t.ratio p.value
##  cong effect    -58.5 4.86 31 -12.046  <.0001
##  inc effect      58.5 4.86 31  12.046  <.0001
## 
## Results are averaged over the levels of: Block 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests
summary(posthoc_visuo_SI_3)
## SI_3 = 56.3:
##  contrast    estimate   SE df t.ratio p.value
##  cong effect    -58.4 4.87 31 -11.989  <.0001
##  inc effect      58.4 4.87 31  11.989  <.0001
## 
## Results are averaged over the levels of: Block 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests

#Proprioceptive Drift Before starting the experiment and after each stroking (two per block), participants were asked to verbally report the felt location of the hidden left index finger. Therefore, the data were collected in three time points: baseline, session 1, and 2. These values of proprioceptive drift across each block are considered as covariate in the following LMM. Here we considered the scores to each question as covariate for our LMM.

#LMM + Social Interaction scores as covariate
lmm_model_Baseline <- lmer(RTNoOutlier ~ Block * VisuoSpatialCongruency * Baseline + (1 + Block * VisuoSpatialCongruency| Subject), control = lmerControl(optimizer = "bobyqa"), data = SRHI)
lmm_model_Drift1 <- lmer(RTNoOutlier ~ Block * VisuoSpatialCongruency * Drift1 + (1 + Block * VisuoSpatialCongruency| Subject), control = lmerControl(optimizer = "bobyqa"), data = SRHI)
lmm_model_Drift2 <- lmer(RTNoOutlier ~ Block * VisuoSpatialCongruency * Drift2 + (1 + Block * VisuoSpatialCongruency| Subject), control = lmerControl(optimizer = "bobyqa"), data = SRHI)



#verifysingularity
isSingular(lmm_model_Baseline)
## [1] FALSE
isSingular(lmm_model_Drift1)
## [1] FALSE
isSingular(lmm_model_Drift2)
## [1] FALSE
#summary
summary(lmm_model_Baseline)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: RTNoOutlier ~ Block * VisuoSpatialCongruency * Baseline + (1 +  
##     Block * VisuoSpatialCongruency | Subject)
##    Data: SRHI
## Control: lmerControl(optimizer = "bobyqa")
## 
## REML criterion at convergence: 28738.3
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.0781 -0.5720 -0.1317  0.3779  5.9400 
## 
## Random effects:
##  Groups   Name                             Variance Std.Dev. Corr             
##  Subject  (Intercept)                       8365     91.46                    
##           BlockS                            2087     45.69    0.06            
##           VisuoSpatialCongruencyinc         3443     58.68    0.10 -0.43      
##           BlockS:VisuoSpatialCongruencyinc  2288     47.83   -0.23  0.28 -0.56
##  Residual                                  11569    107.56                    
## Number of obs: 2340, groups:  Subject, 33
## 
## Fixed effects:
##                                           Estimate Std. Error       df t value
## (Intercept)                               363.1779    51.2995  34.8900   7.080
## BlockS                                    -52.2800    54.9072  33.7410  -0.952
## VisuoSpatialCongruencyinc                 136.1053    62.2382  32.5433   2.187
## Baseline                                   -2.7798     3.3402  30.2561  -0.832
## BlockS:VisuoSpatialCongruencyinc          -21.2618    66.0237  38.9328  -0.322
## BlockS:Baseline                             4.1033     3.6500  33.0538   1.124
## VisuoSpatialCongruencyinc:Baseline         -0.8802     4.1959  32.1563  -0.210
## BlockS:VisuoSpatialCongruencyinc:Baseline   0.6162     4.4104  37.5086   0.140
##                                           Pr(>|t|)    
## (Intercept)                               3.07e-08 ***
## BlockS                                      0.3478    
## VisuoSpatialCongruencyinc                   0.0361 *  
## Baseline                                    0.4118    
## BlockS:VisuoSpatialCongruencyinc            0.7492    
## BlockS:Baseline                             0.2690    
## VisuoSpatialCongruencyinc:Baseline          0.8352    
## BlockS:VisuoSpatialCongruencyinc:Baseline   0.8896    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) BlockS VsSptC Baseln BlS:VSC BlcS:B VsSC:B
## BlockS      -0.876                                           
## VsSptlCngrn  0.003 -0.003                                    
## Baseline    -0.947  0.920 -0.003                             
## BlckS:VsSpC -0.006 -0.037 -0.945  0.001                      
## BlockS:Bsln  0.898 -0.983 -0.002 -0.948  0.030               
## VsSptlCng:B -0.003 -0.003 -0.981  0.003  0.941   0.003       
## BlckS:VSC:B  0.002  0.030  0.948 -0.001 -0.982  -0.028 -0.966
summary(lmm_model_Drift1)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: RTNoOutlier ~ Block * VisuoSpatialCongruency * Drift1 + (1 +  
##     Block * VisuoSpatialCongruency | Subject)
##    Data: SRHI
## Control: lmerControl(optimizer = "bobyqa")
## 
## REML criterion at convergence: 28732.8
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.0732 -0.5780 -0.1211  0.3798  5.9451 
## 
## Random effects:
##  Groups   Name                             Variance Std.Dev. Corr             
##  Subject  (Intercept)                       8726     93.41                    
##           BlockS                            2139     46.25   -0.04            
##           VisuoSpatialCongruencyinc         3421     58.49    0.11 -0.45      
##           BlockS:VisuoSpatialCongruencyinc  1949     44.15   -0.21  0.37 -0.56
##  Residual                                  11569    107.56                    
## Number of obs: 2340, groups:  Subject, 33
## 
## Fixed effects:
##                                         Estimate Std. Error       df t value
## (Intercept)                             350.6040    72.4928  46.8902   4.836
## BlockS                                   22.6458    53.9005  30.2547   0.420
## VisuoSpatialCongruencyinc               107.1639    65.3372  34.7867   1.640
## Drift1                                   -1.8976     4.8019  46.2458  -0.395
## BlockS:VisuoSpatialCongruencyinc        -70.8024    64.3300  32.6071  -1.101
## BlockS:Drift1                            -0.8769     3.6056  30.1591  -0.243
## VisuoSpatialCongruencyinc:Drift1          1.0962     4.3735  34.8871   0.251
## BlockS:VisuoSpatialCongruencyinc:Drift1   3.9500     4.3046  32.5042   0.918
##                                         Pr(>|t|)    
## (Intercept)                             1.47e-05 ***
## BlockS                                     0.677    
## VisuoSpatialCongruencyinc                  0.110    
## Drift1                                     0.695    
## BlockS:VisuoSpatialCongruencyinc           0.279    
## BlockS:Drift1                              0.809    
## VisuoSpatialCongruencyinc:Drift1           0.804    
## BlockS:VisuoSpatialCongruencyinc:Drift1    0.366    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) BlockS VsSptC Drift1 BlS:VSC BlS:D1 VSC:D1
## BlockS      -0.444                                           
## VsSptlCngrn  0.011 -0.119                                    
## Drift1      -0.973  0.450 -0.011                             
## BlckS:VsSpC -0.028 -0.079 -0.705  0.027                      
## BlckS:Drft1  0.445 -0.982  0.115 -0.457  0.076               
## VsSptlCn:D1 -0.011  0.115 -0.983  0.011  0.697  -0.117       
## BlcS:VSC:D1  0.027  0.076  0.697 -0.027 -0.983  -0.078 -0.709
summary(lmm_model_Drift2)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: RTNoOutlier ~ Block * VisuoSpatialCongruency * Drift2 + (1 +  
##     Block * VisuoSpatialCongruency | Subject)
##    Data: SRHI
## Control: lmerControl(optimizer = "bobyqa")
## 
## REML criterion at convergence: 28731.3
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.0820 -0.5831 -0.1202  0.3817  5.9361 
## 
## Random effects:
##  Groups   Name                             Variance Std.Dev. Corr             
##  Subject  (Intercept)                       8556     92.50                    
##           BlockS                            1937     44.01   -0.01            
##           VisuoSpatialCongruencyinc         3435     58.61    0.11 -0.44      
##           BlockS:VisuoSpatialCongruencyinc  2013     44.86   -0.25  0.45 -0.60
##  Residual                                  11569    107.56                    
## Number of obs: 2340, groups:  Subject, 33
## 
## Fixed effects:
##                                         Estimate Std. Error      df t value
## (Intercept)                              388.688     63.353  48.120   6.135
## BlockS                                    50.385     47.856  30.959   1.053
## VisuoSpatialCongruencyinc                106.406     56.026  34.215   1.899
## Drift2                                    -4.428      4.103  47.964  -1.079
## BlockS:VisuoSpatialCongruencyinc         -79.992     57.658  32.816  -1.387
## BlockS:Drift2                             -2.638      3.119  30.922  -0.846
## VisuoSpatialCongruencyinc:Drift2           1.132      3.676  34.417   0.308
## BlockS:VisuoSpatialCongruencyinc:Drift2    4.437      3.772  32.816   1.176
##                                         Pr(>|t|)    
## (Intercept)                             1.54e-07 ***
## BlockS                                     0.301    
## VisuoSpatialCongruencyinc                  0.066 .  
## Drift2                                     0.286    
## BlockS:VisuoSpatialCongruencyinc           0.175    
## BlockS:Drift2                              0.404    
## VisuoSpatialCongruencyinc:Drift2           0.760    
## BlockS:VisuoSpatialCongruencyinc:Drift2    0.248    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) BlockS VsSptC Drift2 BlS:VSC BlS:D2 VSC:D2
## BlockS      -0.237                                           
## VsSptlCngrn  0.016 -0.119                                    
## Drift2      -0.965  0.239 -0.016                             
## BlckS:VsSpC -0.053 -0.084 -0.634  0.051                      
## BlckS:Drft2  0.249 -0.979  0.115 -0.258  0.081               
## VsSptlCn:D2 -0.016  0.116 -0.977  0.016  0.622  -0.118       
## BlcS:VSC:D2  0.050  0.080  0.627 -0.052 -0.978  -0.081 -0.642

Since the models are not singular, we can continue to explore the data through post-hoc comparisons.

# Means of Block * VisuoSpatialCongruency interaction
emmeans_interaction_Baseline <- emmeans(lmm_model_Baseline, ~ Block * VisuoSpatialCongruency| Baseline)
emmeans_interaction_Baseline2 <- emmeans(lmm_model_Baseline, ~ Block * Baseline| VisuoSpatialCongruency)
emmeans_interaction_Baseline3 <- emmeans(lmm_model_Baseline, ~ VisuoSpatialCongruency * Baseline| Block)

emmeans_interaction_Drift1 <- emmeans(lmm_model_Drift1, ~ Block * VisuoSpatialCongruency| Drift1)
emmeans_interaction_Drift12 <- emmeans(lmm_model_Drift1, ~ Block * Drift1| VisuoSpatialCongruency)
emmeans_interaction_Drift13 <- emmeans(lmm_model_Drift1, ~ VisuoSpatialCongruency * Drift1| Block)

emmeans_interaction_Drift2 <- emmeans(lmm_model_Drift2, ~ Block * VisuoSpatialCongruency| Drift2)
emmeans_interaction_Drift22 <- emmeans(lmm_model_Drift2, ~ Block * Drift2| VisuoSpatialCongruency)
emmeans_interaction_Drift23 <- emmeans(lmm_model_Drift2, ~ VisuoSpatialCongruency * Drift2| Block)


# Means of Block
emmeans_block_Baseline <- emmeans(lmm_model_Baseline, ~ Block| Baseline)
## NOTE: Results may be misleading due to involvement in interactions
emmeans_block_Drift1 <- emmeans(lmm_model_Drift1, ~ Block| Drift1)
## NOTE: Results may be misleading due to involvement in interactions
emmeans_block_Drift2 <- emmeans(lmm_model_Drift2, ~ Block| Drift2)
## NOTE: Results may be misleading due to involvement in interactions
# Means of VisuoSpatialCongruency
emmeans_visuo_Baseline <- emmeans(lmm_model_Baseline, ~ VisuoSpatialCongruency| Baseline)
## NOTE: Results may be misleading due to involvement in interactions
emmeans_visuo_Drift1 <- emmeans(lmm_model_Drift1, ~ VisuoSpatialCongruency| Drift1)
## NOTE: Results may be misleading due to involvement in interactions
emmeans_visuo_Drift2 <- emmeans(lmm_model_Drift2, ~ VisuoSpatialCongruency| Drift2)
## NOTE: Results may be misleading due to involvement in interactions
#
# Post hoc comparisons of Block * VisuoSpatialCongruency
posthoc_interaction_Baseline <- pairs(emmeans_interaction_Baseline, adjust = "bonferroni")
posthoc_interaction_Baseline2 <- pairs(emmeans_interaction_Baseline2, adjust = "bonferroni")
posthoc_interaction_Baseline3 <- pairs(emmeans_interaction_Baseline3, adjust = "bonferroni")

posthoc_interaction_Drift1 <- pairs(emmeans_interaction_Drift1, adjust = "bonferroni")
posthoc_interaction_Drift12 <- pairs(emmeans_interaction_Drift12, adjust = "bonferroni")
posthoc_interaction_Drift13 <- pairs(emmeans_interaction_Drift13, adjust = "bonferroni")

posthoc_interaction_Drift2 <- pairs(emmeans_interaction_Drift2, adjust = "bonferroni")
posthoc_interaction_Drift22 <- pairs(emmeans_interaction_Drift22, adjust = "bonferroni")
posthoc_interaction_Drift23 <- pairs(emmeans_interaction_Drift23, adjust = "bonferroni")


# Post hoc comparisons of Block 
posthoc_block_Baseline <- contrast(emmeans_block_Baseline, adjust = "bonferroni")
posthoc_block_Drift1 <- contrast(emmeans_block_Drift1, adjust = "bonferroni")
posthoc_block_Drift2 <- contrast(emmeans_block_Drift2, adjust = "bonferroni")


# Post hoc comparisons of VisuoSpatialCongruency 
posthoc_visuo_Baseline <- contrast(emmeans_visuo_Baseline, adjust = "bonferroni")
posthoc_visuo_Drift1 <- contrast(emmeans_visuo_Drift1, adjust = "bonferroni")
posthoc_visuo_Drift2 <- contrast(emmeans_visuo_Drift2, adjust = "bonferroni")


#
#post hoc summary of Block * VisuoSpatialCongruency
summary(posthoc_interaction_Baseline)
## Baseline = 15.5:
##  contrast        estimate   SE   df t.ratio p.value
##  A cong - S cong  -11.145 10.5 31.3  -1.058  1.0000
##  A cong - A inc  -122.500 12.7 31.9  -9.615  <.0001
##  A cong - S inc  -121.907 12.7 31.9  -9.590  <.0001
##  S cong - A inc  -111.355 17.5 31.8  -6.373  <.0001
##  S cong - S inc  -110.762 10.9 31.1 -10.121  <.0001
##  A inc - S inc      0.593 15.5 30.5   0.038  1.0000
## 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 6 tests
summary(posthoc_interaction_Baseline2)
## VisuoSpatialCongruency = cong:
##  contrast                                                estimate   SE   df
##  A Baseline15.4569848845593 - S Baseline15.4569848845593  -11.145 10.5 31.3
##  t.ratio p.value
##   -1.058  0.2984
## 
## VisuoSpatialCongruency = inc:
##  contrast                                                estimate   SE   df
##  A Baseline15.4569848845593 - S Baseline15.4569848845593    0.593 15.5 30.5
##  t.ratio p.value
##    0.038  0.9698
## 
## Degrees-of-freedom method: kenward-roger
summary(posthoc_interaction_Baseline3)
## Block = A:
##  contrast                                                     estimate   SE
##  cong Baseline15.4569848845593 - inc Baseline15.4569848845593     -122 12.7
##    df t.ratio p.value
##  31.9  -9.615  <.0001
## 
## Block = S:
##  contrast                                                     estimate   SE
##  cong Baseline15.4569848845593 - inc Baseline15.4569848845593     -111 10.9
##    df t.ratio p.value
##  31.1 -10.121  <.0001
## 
## Degrees-of-freedom method: kenward-roger
summary(posthoc_interaction_Drift1)
## Drift1 = 14.7:
##  contrast        estimate   SE   df t.ratio p.value
##  A cong - S cong    -9.75 10.1 30.3  -0.967  1.0000
##  A cong - A inc   -123.28 12.1 30.9 -10.228  <.0001
##  A cong - S inc   -120.31 12.3 30.4  -9.782  <.0001
##  S cong - A inc   -113.53 16.8 30.6  -6.743  <.0001
##  S cong - S inc   -110.55 10.7 30.9 -10.346  <.0001
##  A inc - S inc       2.97 14.6 30.4   0.203  1.0000
## 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 6 tests
summary(posthoc_interaction_Drift12)
## VisuoSpatialCongruency = cong:
##  contrast                                            estimate   SE   df t.ratio
##  A Drift114.7024266690847 - S Drift114.7024266690847    -9.75 10.1 30.3  -0.967
##  p.value
##   0.3413
## 
## VisuoSpatialCongruency = inc:
##  contrast                                            estimate   SE   df t.ratio
##  A Drift114.7024266690847 - S Drift114.7024266690847     2.97 14.6 30.4   0.203
##  p.value
##   0.8402
## 
## Degrees-of-freedom method: kenward-roger
summary(posthoc_interaction_Drift13)
## Block = A:
##  contrast                                                 estimate   SE   df
##  cong Drift114.7024266690847 - inc Drift114.7024266690847     -123 12.1 30.9
##  t.ratio p.value
##  -10.228  <.0001
## 
## Block = S:
##  contrast                                                 estimate   SE   df
##  cong Drift114.7024266690847 - inc Drift114.7024266690847     -111 10.7 30.9
##  t.ratio p.value
##  -10.346  <.0001
## 
## Degrees-of-freedom method: kenward-roger
summary(posthoc_interaction_Drift2)
## Drift2 = 15:
##  contrast        estimate    SE   df t.ratio p.value
##  A cong - S cong   -10.83  9.81 30.5  -1.104  1.0000
##  A cong - A inc   -123.38 12.08 30.9 -10.215  <.0001
##  A cong - S inc   -120.74 12.41 30.6  -9.727  <.0001
##  S cong - A inc   -112.56 16.55 30.8  -6.800  <.0001
##  S cong - S inc   -109.92 10.47 30.9 -10.502  <.0001
##  A inc - S inc       2.64 14.80 30.6   0.178  1.0000
## 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 6 tests
summary(posthoc_interaction_Drift22)
## VisuoSpatialCongruency = cong:
##  contrast                                            estimate    SE   df
##  A Drift214.9922327549613 - S Drift214.9922327549613   -10.83  9.81 30.5
##  t.ratio p.value
##   -1.104  0.2783
## 
## VisuoSpatialCongruency = inc:
##  contrast                                            estimate    SE   df
##  A Drift214.9922327549613 - S Drift214.9922327549613     2.64 14.80 30.6
##  t.ratio p.value
##    0.178  0.8596
## 
## Degrees-of-freedom method: kenward-roger
summary(posthoc_interaction_Drift23)
## Block = A:
##  contrast                                                 estimate   SE   df
##  cong Drift214.9922327549613 - inc Drift214.9922327549613     -123 12.1 30.9
##  t.ratio p.value
##  -10.215  <.0001
## 
## Block = S:
##  contrast                                                 estimate   SE   df
##  cong Drift214.9922327549613 - inc Drift214.9922327549613     -110 10.5 30.9
##  t.ratio p.value
##  -10.502  <.0001
## 
## Degrees-of-freedom method: kenward-roger
#post hoc summary of Block 
summary(posthoc_block_Baseline)
## Baseline = 15.5:
##  contrast estimate   SE   df t.ratio p.value
##  A effect    -2.64 5.79 30.7  -0.455  1.0000
##  S effect     2.64 5.79 30.7   0.455  1.0000
## 
## Results are averaged over the levels of: VisuoSpatialCongruency 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests
summary(posthoc_block_Drift1)
## Drift1 = 14.7:
##  contrast estimate   SE   df t.ratio p.value
##  A effect    -1.69 5.54 30.3  -0.306  1.0000
##  S effect     1.69 5.54 30.3   0.306  1.0000
## 
## Results are averaged over the levels of: VisuoSpatialCongruency 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests
summary(posthoc_block_Drift2)
## Drift2 = 15:
##  contrast estimate   SE   df t.ratio p.value
##  A effect    -2.05 5.52 30.5  -0.371  1.0000
##  S effect     2.05 5.52 30.5   0.371  1.0000
## 
## Results are averaged over the levels of: VisuoSpatialCongruency 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests
#post hoc summary of VisuoSpatialCongruency
summary(posthoc_visuo_Baseline)
## Baseline = 15.5:
##  contrast    estimate   SE   df t.ratio p.value
##  cong effect    -58.3 4.98 32.7 -11.713  <.0001
##  inc effect      58.3 4.98 32.7  11.713  <.0001
## 
## Results are averaged over the levels of: Block 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests
summary(posthoc_visuo_Drift1)
## Drift1 = 14.7:
##  contrast    estimate   SE   df t.ratio p.value
##  cong effect    -58.5 4.86 30.9 -12.019  <.0001
##  inc effect      58.5 4.86 30.9  12.019  <.0001
## 
## Results are averaged over the levels of: Block 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests
summary(posthoc_visuo_Drift2)
## Drift2 = 15:
##  contrast    estimate  SE df t.ratio p.value
##  cong effect    -58.3 4.8 31 -12.158  <.0001
##  inc effect      58.3 4.8 31  12.158  <.0001
## 
## Results are averaged over the levels of: Block 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests

##Perceived Similarity Participants also responded to some brief questions explicitly verifying the comfortability of the social-touch experience and the perceived similarity with the experimenter. Specifically, based on Myers & Hodges (2011); Goldstein & Cialdini (2007); Batson et al. (1997), as a measure of Perceived Similarity, we asked participants on a 9-point Likert scale, ranging from “Not at all” to “Extremely”, to what extent they felt: (1) Sharing similar attributes with the experimenter; (2) A shared identity with the experimenter; (3) Being similar to the experimenter. Moreover, we asked how comfortable they were with the touch during the experiment on a Visual Analog Scale (VAS) scale from 0 to 100.

Here we considered the scores to each question as covariate for our LMM.

#LMM + Social Interaction scores as covariate
lmm_model_TC <- lmer(RTNoOutlier ~ Block * VisuoSpatialCongruency * TouchComfortability + (1 + Block * VisuoSpatialCongruency| Subject), control = lmerControl(optimizer = "bobyqa"), data = SRHI)
lmm_model_SA <- lmer(RTNoOutlier ~ Block * VisuoSpatialCongruency * SimilarAttributes + (1 + Block * VisuoSpatialCongruency| Subject), control = lmerControl(optimizer = "bobyqa"), data = SRHI)
lmm_model_SI <- lmer(RTNoOutlier ~ Block * VisuoSpatialCongruency * SharedIdentity + (1 + Block * VisuoSpatialCongruency| Subject), control = lmerControl(optimizer = "bobyqa"), data = SRHI)
lmm_model_S <- lmer(RTNoOutlier ~ Block * VisuoSpatialCongruency * Similarity + (1 + Block * VisuoSpatialCongruency| Subject), control = lmerControl(optimizer = "bobyqa"), data = SRHI)



#verifysingularity
isSingular(lmm_model_TC)
## [1] FALSE
isSingular(lmm_model_SA)
## [1] FALSE
isSingular(lmm_model_SI)
## [1] FALSE
isSingular(lmm_model_S)
## [1] FALSE
#summary
summary(lmm_model_TC)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: RTNoOutlier ~ Block * VisuoSpatialCongruency * TouchComfortability +  
##     (1 + Block * VisuoSpatialCongruency | Subject)
##    Data: SRHI
## Control: lmerControl(optimizer = "bobyqa")
## 
## REML criterion at convergence: 28748.1
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.0743 -0.5767 -0.1183  0.3802  5.9438 
## 
## Random effects:
##  Groups   Name                             Variance Std.Dev. Corr             
##  Subject  (Intercept)                       8769     93.64                    
##           BlockS                            2046     45.23    0.01            
##           VisuoSpatialCongruencyinc         3405     58.35    0.11 -0.41      
##           BlockS:VisuoSpatialCongruencyinc  2317     48.13   -0.31  0.35 -0.60
##  Residual                                  11570    107.56                    
## Number of obs: 2340, groups:  Subject, 33
## 
## Fixed effects:
##                                                       Estimate Std. Error
## (Intercept)                                          319.72389   47.11610
## BlockS                                                45.40885   58.09743
## VisuoSpatialCongruencyinc                            138.67058   51.43791
## TouchComfortability                                    0.03602    0.52281
## BlockS:VisuoSpatialCongruencyinc                     -97.74935   66.51605
## BlockS:TouchComfortability                            -0.40842    0.66078
## VisuoSpatialCongruencyinc:TouchComfortability         -0.18417    0.59577
## BlockS:VisuoSpatialCongruencyinc:TouchComfortability   0.97845    0.76188
##                                                             df t value Pr(>|t|)
## (Intercept)                                           39.39936   6.786 4.02e-08
## BlockS                                                30.79919   0.782   0.4404
## VisuoSpatialCongruencyinc                             33.61700   2.696   0.0109
## TouchComfortability                                   33.82423   0.069   0.9455
## BlockS:VisuoSpatialCongruencyinc                      39.64204  -1.470   0.1496
## BlockS:TouchComfortability                            30.99206  -0.618   0.5410
## VisuoSpatialCongruencyinc:TouchComfortability         33.54350  -0.309   0.7591
## BlockS:VisuoSpatialCongruencyinc:TouchComfortability  40.19853   1.284   0.2064
##                                                         
## (Intercept)                                          ***
## BlockS                                                  
## VisuoSpatialCongruencyinc                            *  
## TouchComfortability                                     
## BlockS:VisuoSpatialCongruencyinc                        
## BlockS:TouchComfortability                              
## VisuoSpatialCongruencyinc:TouchComfortability           
## BlockS:VisuoSpatialCongruencyinc:TouchComfortability    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) BlockS VsSptC TchCmf BlS:VSC BlS:TC VSC:TC
## BlockS      -0.302                                           
## VsSptlCngrn  0.022 -0.064                                    
## TchCmfrtblt -0.934  0.317 -0.023                             
## BlckS:VsSpC -0.052 -0.148 -0.595  0.048                      
## BlckS:TchCm  0.326 -0.985  0.061 -0.350  0.144               
## VsSptlCn:TC -0.023  0.061 -0.972  0.024  0.585  -0.062       
## BlcS:VSC:TC  0.045  0.142  0.598 -0.048 -0.982  -0.142 -0.615
summary(lmm_model_SA)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: RTNoOutlier ~ Block * VisuoSpatialCongruency * SimilarAttributes +  
##     (1 + Block * VisuoSpatialCongruency | Subject)
##    Data: SRHI
## Control: lmerControl(optimizer = "bobyqa")
## 
## REML criterion at convergence: 28732.4
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.0714 -0.5750 -0.1251  0.3783  5.9466 
## 
## Random effects:
##  Groups   Name                             Variance Std.Dev. Corr             
##  Subject  (Intercept)                       8758     93.59                    
##           BlockS                            2048     45.26    0.02            
##           VisuoSpatialCongruencyinc         3355     57.92    0.09 -0.43      
##           BlockS:VisuoSpatialCongruencyinc  2246     47.39   -0.26  0.34 -0.54
##  Residual                                  11570    107.56                    
## Number of obs: 2340, groups:  Subject, 33
## 
## Fixed effects:
##                                                    Estimate Std. Error      df
## (Intercept)                                         339.007     32.350  48.083
## BlockS                                                7.619     25.250  30.971
## VisuoSpatialCongruencyinc                           133.051     27.600  34.537
## SimilarAttributes                                    -3.418      5.795  47.792
## BlockS:VisuoSpatialCongruencyinc                    -28.981     30.281  33.390
## BlockS:SimilarAttributes                              0.707      4.552  31.102
## VisuoSpatialCongruencyinc:SimilarAttributes          -2.063      5.238  35.332
## BlockS:VisuoSpatialCongruencyinc:SimilarAttributes    3.311      5.610  34.307
##                                                    t value Pr(>|t|)    
## (Intercept)                                         10.479 5.24e-14 ***
## BlockS                                               0.302    0.765    
## VisuoSpatialCongruencyinc                            4.821 2.83e-05 ***
## SimilarAttributes                                   -0.590    0.558    
## BlockS:VisuoSpatialCongruencyinc                    -0.957    0.345    
## BlockS:SimilarAttributes                             0.155    0.878    
## VisuoSpatialCongruencyinc:SimilarAttributes         -0.394    0.696    
## BlockS:VisuoSpatialCongruencyinc:SimilarAttributes   0.590    0.559    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) BlockS VsSptC SmlrAt BlS:VSC BlS:SA VSC:SA
## BlockS      -0.129                                           
## VsSptlCngrn -0.011 -0.112                                    
## SmlrAttrbts -0.854  0.129  0.007                             
## BlckS:VsSpC -0.060 -0.139 -0.571  0.052                      
## BlckS:SmlrA  0.210 -0.914  0.096 -0.246  0.122               
## VsSptlCn:SA  0.006  0.100 -0.901 -0.006  0.519  -0.107       
## BlcS:VSC:SA  0.046  0.116  0.559 -0.055 -0.913  -0.117 -0.621
summary(lmm_model_SI)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: RTNoOutlier ~ Block * VisuoSpatialCongruency * SharedIdentity +  
##     (1 + Block * VisuoSpatialCongruency | Subject)
##    Data: SRHI
## Control: lmerControl(optimizer = "bobyqa")
## 
## REML criterion at convergence: 28730.6
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.0788 -0.5714 -0.1231  0.3795  5.9391 
## 
## Random effects:
##  Groups   Name                             Variance Std.Dev. Corr             
##  Subject  (Intercept)                       9068     95.22                    
##           BlockS                            1723     41.50   -0.04            
##           VisuoSpatialCongruencyinc         3425     58.53    0.09 -0.46      
##           BlockS:VisuoSpatialCongruencyinc  2278     47.73   -0.25  0.38 -0.55
##  Residual                                  11570    107.56                    
## Number of obs: 2340, groups:  Subject, 33
## 
## Fixed effects:
##                                                 Estimate Std. Error       df
## (Intercept)                                     336.1413    23.9195  48.6494
## BlockS                                           32.0143    22.8826  30.9951
## VisuoSpatialCongruencyinc                       120.5813    23.1907  34.8162
## SharedIdentity                                   -3.3376     4.1695  32.5023
## BlockS:VisuoSpatialCongruencyinc                -10.7266    28.1536  39.2151
## BlockS:SharedIdentity                            -4.8338     4.9476  31.8384
## VisuoSpatialCongruencyinc:SharedIdentity          0.6699     5.0125  34.7096
## BlockS:VisuoSpatialCongruencyinc:SharedIdentity  -0.5245     6.1511  42.7759
##                                                 t value Pr(>|t|)    
## (Intercept)                                      14.053  < 2e-16 ***
## BlockS                                            1.399    0.172    
## VisuoSpatialCongruencyinc                         5.200 8.89e-06 ***
## SharedIdentity                                   -0.800    0.429    
## BlockS:VisuoSpatialCongruencyinc                 -0.381    0.705    
## BlockS:SharedIdentity                            -0.977    0.336    
## VisuoSpatialCongruencyinc:SharedIdentity          0.134    0.894    
## BlockS:VisuoSpatialCongruencyinc:SharedIdentity  -0.085    0.932    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) BlockS VsSptC ShrdId BlS:VSC BlS:SI VSC:SI
## BlockS      -0.320                                           
## VsSptlCngrn  0.002 -0.071                                    
## ShardIdntty -0.698  0.400 -0.013                             
## BlckS:VsSpC -0.043 -0.145 -0.622  0.026                      
## BlckS:ShrdI  0.344 -0.909  0.047 -0.493  0.130               
## VsSptlCn:SI -0.010  0.050 -0.854  0.015  0.570  -0.054       
## BlcS:VSC:SI  0.020  0.126  0.577 -0.029 -0.899  -0.133 -0.676
summary(lmm_model_S)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: RTNoOutlier ~ Block * VisuoSpatialCongruency * Similarity + (1 +  
##     Block * VisuoSpatialCongruency | Subject)
##    Data: SRHI
## Control: lmerControl(optimizer = "bobyqa")
## 
## REML criterion at convergence: 28732.4
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.0699 -0.5732 -0.1256  0.3757  5.9481 
## 
## Random effects:
##  Groups   Name                             Variance Std.Dev. Corr             
##  Subject  (Intercept)                       8681     93.17                    
##           BlockS                            2151     46.38   -0.01            
##           VisuoSpatialCongruencyinc         3247     56.98    0.14 -0.44      
##           BlockS:VisuoSpatialCongruencyinc  2268     47.62   -0.30  0.30 -0.53
##  Residual                                  11570    107.56                    
## Number of obs: 2340, groups:  Subject, 33
## 
## Fixed effects:
##                                             Estimate Std. Error      df t value
## (Intercept)                                  314.057     27.008  48.054  11.628
## BlockS                                        15.490     24.961  30.594   0.621
## VisuoSpatialCongruencyinc                    141.403     24.947  36.185   5.668
## Similarity                                     1.998      4.878  38.762   0.410
## BlockS:VisuoSpatialCongruencyinc             -36.190     29.328  36.877  -1.234
## BlockS:Similarity                             -1.401      4.830  31.168  -0.290
## VisuoSpatialCongruencyinc:Similarity          -4.198      5.073  36.836  -0.828
## BlockS:VisuoSpatialCongruencyinc:Similarity    5.307      5.835  39.372   0.910
##                                             Pr(>|t|)    
## (Intercept)                                 1.42e-15 ***
## BlockS                                         0.539    
## VisuoSpatialCongruencyinc                   1.90e-06 ***
## Similarity                                     0.684    
## BlockS:VisuoSpatialCongruencyinc               0.225    
## BlockS:Similarity                              0.774    
## VisuoSpatialCongruencyinc:Similarity           0.413    
## BlockS:VisuoSpatialCongruencyinc:Similarity    0.369    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) BlockS VsSptC Smlrty BlS:VSC BlcS:S VsSC:S
## BlockS      -0.211                                           
## VsSptlCngrn  0.025 -0.098                                    
## Similarity  -0.784  0.232 -0.025                             
## BlckS:VsSpC -0.069 -0.160 -0.581  0.053                      
## BlckS:Smlrt  0.284 -0.908  0.079 -0.362  0.138               
## VsSptlCng:S -0.023  0.081 -0.881  0.030  0.529  -0.089       
## BlckS:VSC:S  0.045  0.132  0.568 -0.059 -0.906  -0.133 -0.646

Since the models are not singular, we can continue to explore the data through post-hoc comparisons.

# Means of Block * VisuoSpatialCongruency interaction
emmeans_interaction_TC <- emmeans(lmm_model_TC, ~ Block * VisuoSpatialCongruency| TouchComfortability)
emmeans_interaction_TC2 <- emmeans(lmm_model_TC, ~ Block * TouchComfortability| VisuoSpatialCongruency)
emmeans_interaction_TC3 <- emmeans(lmm_model_TC, ~ VisuoSpatialCongruency * TouchComfortability| Block)

emmeans_interaction_SA <- emmeans(lmm_model_SA, ~ Block * VisuoSpatialCongruency| SimilarAttributes)
emmeans_interaction_SA2 <- emmeans(lmm_model_SA, ~ Block * SimilarAttributes| VisuoSpatialCongruency)
emmeans_interaction_SA3 <- emmeans(lmm_model_SA, ~ VisuoSpatialCongruency * SimilarAttributes| Block)

emmeans_interaction_SI <- emmeans(lmm_model_SI, ~ Block * VisuoSpatialCongruency| SharedIdentity)
emmeans_interaction_SI2 <- emmeans(lmm_model_SI, ~ Block * SharedIdentity| VisuoSpatialCongruency)
emmeans_interaction_SI3 <- emmeans(lmm_model_SI, ~ VisuoSpatialCongruency * SharedIdentity| Block)

emmeans_interaction_S <- emmeans(lmm_model_S, ~ Block * VisuoSpatialCongruency| Similarity)
emmeans_interaction_S2 <- emmeans(lmm_model_S, ~ Block * Similarity| VisuoSpatialCongruency)
emmeans_interaction_S3 <- emmeans(lmm_model_S, ~ VisuoSpatialCongruency * Similarity| Block)


# Means of Block
emmeans_block_TC <- emmeans(lmm_model_TC, ~ Block| TouchComfortability)
## NOTE: Results may be misleading due to involvement in interactions
emmeans_block_SA <- emmeans(lmm_model_SA, ~ Block| SimilarAttributes)
## NOTE: Results may be misleading due to involvement in interactions
emmeans_block_SI <- emmeans(lmm_model_SI, ~ Block| SharedIdentity)
## NOTE: Results may be misleading due to involvement in interactions
emmeans_block_S <- emmeans(lmm_model_S, ~ Block| Similarity)
## NOTE: Results may be misleading due to involvement in interactions
# Means of VisuoSpatialCongruency
emmeans_visuo_TC <- emmeans(lmm_model_TC, ~ VisuoSpatialCongruency| TouchComfortability)
## NOTE: Results may be misleading due to involvement in interactions
emmeans_visuo_SA <- emmeans(lmm_model_SA, ~ VisuoSpatialCongruency| SimilarAttributes)
## NOTE: Results may be misleading due to involvement in interactions
emmeans_visuo_SI <- emmeans(lmm_model_SI, ~ VisuoSpatialCongruency| SharedIdentity)
## NOTE: Results may be misleading due to involvement in interactions
emmeans_visuo_S <- emmeans(lmm_model_S, ~ VisuoSpatialCongruency| Similarity)
## NOTE: Results may be misleading due to involvement in interactions
#
# Post hoc comparisons of Block * VisuoSpatialCongruency
posthoc_interaction_TC <- pairs(emmeans_interaction_TC, adjust = "bonferroni")
posthoc_interaction_TC2 <- pairs(emmeans_interaction_TC2, adjust = "bonferroni")
posthoc_interaction_TC3 <- pairs(emmeans_interaction_TC3, adjust = "bonferroni")

posthoc_interaction_SA <- pairs(emmeans_interaction_SA, adjust = "bonferroni")
posthoc_interaction_SA2 <- pairs(emmeans_interaction_SA2, adjust = "bonferroni")
posthoc_interaction_SA3 <- pairs(emmeans_interaction_SA3, adjust = "bonferroni")

posthoc_interaction_SI <- pairs(emmeans_interaction_SI, adjust = "bonferroni")
posthoc_interaction_SI2 <- pairs(emmeans_interaction_SI2, adjust = "bonferroni")
posthoc_interaction_SI3 <- pairs(emmeans_interaction_SI3, adjust = "bonferroni")

posthoc_interaction_S <- pairs(emmeans_interaction_S, adjust = "bonferroni")
posthoc_interaction_S2 <- pairs(emmeans_interaction_S2, adjust = "bonferroni")
posthoc_interaction_S3 <- pairs(emmeans_interaction_S3, adjust = "bonferroni")


# Post hoc comparisons of Block 
posthoc_block_TC <- contrast(emmeans_block_TC, adjust = "bonferroni")
posthoc_block_SA <- contrast(emmeans_block_SA, adjust = "bonferroni")
posthoc_block_SI <- contrast(emmeans_block_SI, adjust = "bonferroni")
posthoc_block_S <- contrast(emmeans_block_S, adjust = "bonferroni")

# Post hoc comparisons of VisuoSpatialCongruency 
posthoc_visuo_TC <- contrast(emmeans_visuo_TC, adjust = "bonferroni")
posthoc_visuo_SA <- contrast(emmeans_visuo_SA, adjust = "bonferroni")
posthoc_visuo_SI <- contrast(emmeans_visuo_SI, adjust = "bonferroni")
posthoc_visuo_S <- contrast(emmeans_visuo_S, adjust = "bonferroni")


#
#post hoc summary of Block * VisuoSpatialCongruency
summary(posthoc_interaction_TC)
## TouchComfortability = 85.7:
##  contrast        estimate   SE   df t.ratio p.value
##  A cong - S cong   -10.40 10.1 30.4  -1.027  1.0000
##  A cong - A inc   -122.89 12.1 31.0 -10.169  <.0001
##  A cong - S inc   -119.40 12.6 30.8  -9.481  <.0001
##  S cong - A inc   -112.48 16.6 31.0  -6.762  <.0001
##  S cong - S inc   -109.00 10.6 31.1 -10.246  <.0001
##  A inc - S inc       3.48 15.1 30.8   0.231  1.0000
## 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 6 tests
summary(posthoc_interaction_TC2)
## VisuoSpatialCongruency = cong:
##  contrast                                                                   
##  A TouchComfortability85.708547008547 - S TouchComfortability85.708547008547
##  estimate   SE   df t.ratio p.value
##    -10.40 10.1 30.4  -1.027  0.3125
## 
## VisuoSpatialCongruency = inc:
##  contrast                                                                   
##  A TouchComfortability85.708547008547 - S TouchComfortability85.708547008547
##  estimate   SE   df t.ratio p.value
##      3.48 15.1 30.8   0.231  0.8191
## 
## Degrees-of-freedom method: kenward-roger
summary(posthoc_interaction_TC3)
## Block = A:
##  contrast                                                                        
##  cong TouchComfortability85.708547008547 - inc TouchComfortability85.708547008547
##  estimate   SE   df t.ratio p.value
##      -123 12.1 31.0 -10.169  <.0001
## 
## Block = S:
##  contrast                                                                        
##  cong TouchComfortability85.708547008547 - inc TouchComfortability85.708547008547
##  estimate   SE   df t.ratio p.value
##      -109 10.6 31.1 -10.246  <.0001
## 
## Degrees-of-freedom method: kenward-roger
summary(posthoc_interaction_SA)
## SimilarAttributes = 4.96:
##  contrast        estimate   SE   df t.ratio p.value
##  A cong - S cong   -11.12 10.3 32.1  -1.077  1.0000
##  A cong - A inc   -122.83 12.0 31.0 -10.216  <.0001
##  A cong - S inc   -121.38 12.9 32.1  -9.427  <.0001
##  S cong - A inc   -111.70 16.8 32.0  -6.646  <.0001
##  S cong - S inc   -110.26 11.0 30.9 -10.013  <.0001
##  A inc - S inc       1.44 15.1 32.3   0.095  1.0000
## 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 6 tests
summary(posthoc_interaction_SA2)
## VisuoSpatialCongruency = cong:
##  contrast                                                                 
##  A SimilarAttributes4.95726495726496 - S SimilarAttributes4.95726495726496
##  estimate   SE   df t.ratio p.value
##    -11.12 10.3 32.1  -1.077  0.2894
## 
## VisuoSpatialCongruency = inc:
##  contrast                                                                 
##  A SimilarAttributes4.95726495726496 - S SimilarAttributes4.95726495726496
##  estimate   SE   df t.ratio p.value
##      1.44 15.1 32.3   0.095  0.9245
## 
## Degrees-of-freedom method: kenward-roger
summary(posthoc_interaction_SA3)
## Block = A:
##  contrast                                                                      
##  cong SimilarAttributes4.95726495726496 - inc SimilarAttributes4.95726495726496
##  estimate SE   df t.ratio p.value
##      -123 12 31.0 -10.216  <.0001
## 
## Block = S:
##  contrast                                                                      
##  cong SimilarAttributes4.95726495726496 - inc SimilarAttributes4.95726495726496
##  estimate SE   df t.ratio p.value
##      -110 11 30.9 -10.013  <.0001
## 
## Degrees-of-freedom method: kenward-roger
summary(posthoc_interaction_SI)
## SharedIdentity = 4.11:
##  contrast        estimate    SE   df t.ratio p.value
##  A cong - S cong  -12.144  9.56 30.2  -1.271  1.0000
##  A cong - A inc  -123.335 12.09 31.1 -10.204  <.0001
##  A cong - S inc  -122.597 12.33 30.4  -9.944  <.0001
##  S cong - A inc  -111.191 16.36 30.9  -6.796  <.0001
##  S cong - S inc  -110.452 10.97 30.9 -10.073  <.0001
##  A inc - S inc      0.738 14.66 30.6   0.050  1.0000
## 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 6 tests
summary(posthoc_interaction_SI2)
## VisuoSpatialCongruency = cong:
##  contrast                                                            estimate
##  A SharedIdentity4.11068376068376 - S SharedIdentity4.11068376068376  -12.144
##     SE   df t.ratio p.value
##   9.56 30.2  -1.271  0.2136
## 
## VisuoSpatialCongruency = inc:
##  contrast                                                            estimate
##  A SharedIdentity4.11068376068376 - S SharedIdentity4.11068376068376    0.738
##     SE   df t.ratio p.value
##  14.66 30.6   0.050  0.9601
## 
## Degrees-of-freedom method: kenward-roger
summary(posthoc_interaction_SI3)
## Block = A:
##  contrast                                                                
##  cong SharedIdentity4.11068376068376 - inc SharedIdentity4.11068376068376
##  estimate   SE   df t.ratio p.value
##      -123 12.1 31.1 -10.204  <.0001
## 
## Block = S:
##  contrast                                                                
##  cong SharedIdentity4.11068376068376 - inc SharedIdentity4.11068376068376
##  estimate   SE   df t.ratio p.value
##      -110 11.0 30.9 -10.073  <.0001
## 
## Degrees-of-freedom method: kenward-roger
summary(posthoc_interaction_S)
## Similarity = 4.58:
##  contrast        estimate   SE   df t.ratio p.value
##  A cong - S cong    -9.08 10.5 31.3  -0.864  1.0000
##  A cong - A inc   -122.19 11.9 31.1 -10.264  <.0001
##  A cong - S inc   -119.37 12.8 31.6  -9.323  <.0001
##  S cong - A inc   -113.12 16.9 31.8  -6.701  <.0001
##  S cong - S inc   -110.29 11.0 30.9  -9.999  <.0001
##  A inc - S inc       2.83 15.2 31.8   0.186  1.0000
## 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 6 tests
summary(posthoc_interaction_S2)
## VisuoSpatialCongruency = cong:
##  contrast                                                    estimate   SE   df
##  A Similarity4.57606837606838 - S Similarity4.57606837606838    -9.08 10.5 31.3
##  t.ratio p.value
##   -0.864  0.3943
## 
## VisuoSpatialCongruency = inc:
##  contrast                                                    estimate   SE   df
##  A Similarity4.57606837606838 - S Similarity4.57606837606838     2.83 15.2 31.8
##  t.ratio p.value
##    0.186  0.8535
## 
## Degrees-of-freedom method: kenward-roger
summary(posthoc_interaction_S3)
## Block = A:
##  contrast                                                         estimate   SE
##  cong Similarity4.57606837606838 - inc Similarity4.57606837606838     -122 11.9
##    df t.ratio p.value
##  31.1 -10.264  <.0001
## 
## Block = S:
##  contrast                                                         estimate   SE
##  cong Similarity4.57606837606838 - inc Similarity4.57606837606838     -110 11.0
##    df t.ratio p.value
##  30.9  -9.999  <.0001
## 
## Degrees-of-freedom method: kenward-roger
#post hoc summary of Block 
summary(posthoc_block_TC)
## TouchComfortability = 85.7:
##  contrast estimate   SE   df t.ratio p.value
##  A effect    -1.73 5.63 30.6  -0.307  1.0000
##  S effect     1.73 5.63 30.6   0.307  1.0000
## 
## Results are averaged over the levels of: VisuoSpatialCongruency 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests
summary(posthoc_block_SA)
## SimilarAttributes = 4.96:
##  contrast estimate   SE   df t.ratio p.value
##  A effect    -2.42 5.69 32.5  -0.425  1.0000
##  S effect     2.42 5.69 32.5   0.425  1.0000
## 
## Results are averaged over the levels of: VisuoSpatialCongruency 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests
summary(posthoc_block_SI)
## SharedIdentity = 4.11:
##  contrast estimate   SE   df t.ratio p.value
##  A effect    -2.85 5.36 30.5  -0.532  1.0000
##  S effect     2.85 5.36 30.5   0.532  1.0000
## 
## Results are averaged over the levels of: VisuoSpatialCongruency 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests
summary(posthoc_block_S)
## Similarity = 4.58:
##  contrast estimate   SE   df t.ratio p.value
##  A effect    -1.56 5.73 31.7  -0.273  1.0000
##  S effect     1.56 5.73 31.7   0.273  1.0000
## 
## Results are averaged over the levels of: VisuoSpatialCongruency 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests
#post hoc summary of VisuoSpatialCongruency
summary(posthoc_visuo_TC)
## TouchComfortability = 85.7:
##  contrast    estimate   SE   df t.ratio p.value
##  cong effect      -58 4.77 31.2 -12.161  <.0001
##  inc effect        58 4.77 31.2  12.161  <.0001
## 
## Results are averaged over the levels of: Block 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests
summary(posthoc_visuo_SA)
## SimilarAttributes = 4.96:
##  contrast    estimate   SE   df t.ratio p.value
##  cong effect    -58.3 4.86 31.2 -11.981  <.0001
##  inc effect      58.3 4.86 31.2  11.981  <.0001
## 
## Results are averaged over the levels of: Block 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests
summary(posthoc_visuo_SI)
## SharedIdentity = 4.11:
##  contrast    estimate   SE   df t.ratio p.value
##  cong effect    -58.4 4.87 31.2 -11.994  <.0001
##  inc effect      58.4 4.87 31.2  11.994  <.0001
## 
## Results are averaged over the levels of: Block 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests
summary(posthoc_visuo_S)
## Similarity = 4.58:
##  contrast    estimate   SE   df t.ratio p.value
##  cong effect    -58.1 4.82 31.3 -12.062  <.0001
##  inc effect      58.1 4.82 31.3  12.062  <.0001
## 
## Results are averaged over the levels of: Block 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests

##SRHI-Q Participants completed a questionnaire assessing the strength of the ‘social’ rubber hand illusion (SRHI-Q), adapted from a validated questionnaire developed by Longo et al. (2008). This questionnaire assessed the strength of the illusion in the paradigm through three components: Ownership, Location and Hand Loss. It consisted of 13 statements (listed below) measured on a 7-point Likert scale, ranging from “Strongly disagree” to “Strongly agree” with responses scoring -3 to 3, respectively. Thus, negative scores corresponded to disagreement with the statements, while positive scores corresponded to agreement with the statements.

Here we considered the scores to each question as covariate for our LMM.

#LMM + Social Interaction scores as covariate
lmm_model_Ownership <- lmer(RTNoOutlier ~ Block * VisuoSpatialCongruency * Ownership + (1 + Block * VisuoSpatialCongruency| Subject), control = lmerControl(optimizer = "bobyqa"), data = SRHI)
lmm_model_Location <- lmer(RTNoOutlier ~ Block * VisuoSpatialCongruency * Location + (1 + Block * VisuoSpatialCongruency| Subject), control = lmerControl(optimizer = "bobyqa"), data = SRHI)
lmm_model_HandLoss <- lmer(RTNoOutlier ~ Block * VisuoSpatialCongruency * HandLoss + (1 + Block * VisuoSpatialCongruency| Subject), control = lmerControl(optimizer = "bobyqa"), data = SRHI)


#verifysingularity
isSingular(lmm_model_Ownership)
## [1] FALSE
isSingular(lmm_model_Location)
## [1] FALSE
isSingular(lmm_model_HandLoss)
## [1] FALSE
#summary
summary(lmm_model_Ownership)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: RTNoOutlier ~ Block * VisuoSpatialCongruency * Ownership + (1 +  
##     Block * VisuoSpatialCongruency | Subject)
##    Data: SRHI
## Control: lmerControl(optimizer = "bobyqa")
## 
## REML criterion at convergence: 28723.5
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.1106 -0.5788 -0.1321  0.3841  5.9078 
## 
## Random effects:
##  Groups   Name                             Variance Std.Dev. Corr             
##  Subject  (Intercept)                       8431     91.82                    
##           BlockS                            2227     47.20    0.02            
##           VisuoSpatialCongruencyinc         3210     56.66    0.19 -0.43      
##           BlockS:VisuoSpatialCongruencyinc  2232     47.25   -0.33  0.22 -0.62
##  Residual                                  11569    107.56                    
## Number of obs: 2340, groups:  Subject, 33
## 
## Fixed effects:
##                                            Estimate Std. Error      df t value
## (Intercept)                                 330.239     21.891  45.336  15.086
## BlockS                                        9.077     17.665  32.694   0.514
## VisuoSpatialCongruencyinc                   106.503     20.621  34.682   5.165
## Ownership                                     3.831      7.295  32.739   0.525
## BlockS:VisuoSpatialCongruencyinc             20.068     21.605  37.331   0.929
## BlockS:Ownership                              1.393      8.448  31.976   0.165
## VisuoSpatialCongruencyinc:Ownership          -8.455      8.561  32.870  -0.988
## BlockS:VisuoSpatialCongruencyinc:Ownership   20.403      9.892  41.581   2.063
##                                            Pr(>|t|)    
## (Intercept)                                 < 2e-16 ***
## BlockS                                       0.6108    
## VisuoSpatialCongruencyinc                  9.98e-06 ***
## Ownership                                    0.6030    
## BlockS:VisuoSpatialCongruencyinc             0.3589    
## BlockS:Ownership                             0.8701    
## VisuoSpatialCongruencyinc:Ownership          0.3305    
## BlockS:VisuoSpatialCongruencyinc:Ownership   0.0454 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) BlockS VsSptC Ownrsh BlS:VSC BlcS:O VsSC:O
## BlockS      -0.454                                           
## VsSptlCngrn  0.045 -0.087                                    
## Ownership    0.654 -0.626  0.030                             
## BlckS:VsSpC -0.081 -0.087 -0.798 -0.041                      
## BlckS:Ownrs -0.375  0.786 -0.052 -0.570 -0.064               
## VsSptlCng:O  0.023 -0.051  0.821  0.034 -0.722  -0.065       
## BlckS:VSC:O -0.032 -0.071 -0.625 -0.048  0.809  -0.131 -0.760
summary(lmm_model_Location)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: RTNoOutlier ~ Block * VisuoSpatialCongruency * Location + (1 +  
##     Block * VisuoSpatialCongruency | Subject)
##    Data: SRHI
## Control: lmerControl(optimizer = "bobyqa")
## 
## REML criterion at convergence: 28728.8
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.0955 -0.5754 -0.1269  0.3797  5.9226 
## 
## Random effects:
##  Groups   Name                             Variance Std.Dev. Corr             
##  Subject  (Intercept)                       8707     93.31                    
##           BlockS                            2141     46.27   -0.01            
##           VisuoSpatialCongruencyinc         3310     57.53    0.14 -0.42      
##           BlockS:VisuoSpatialCongruencyinc  2352     48.50   -0.30  0.27 -0.55
##  Residual                                  11569    107.56                    
## Number of obs: 2340, groups:  Subject, 33
## 
## Fixed effects:
##                                           Estimate Std. Error       df t value
## (Intercept)                               324.8968    22.0460  45.1715  14.737
## BlockS                                      9.5488    16.3156  34.5660   0.585
## VisuoSpatialCongruencyinc                 112.9148    19.6932  34.6423   5.734
## Location                                    1.2204     8.0557  35.3073   0.152
## BlockS:VisuoSpatialCongruencyinc           -0.4746    19.6728  36.1205  -0.024
## BlockS:Location                             1.9375     7.9635  31.6853   0.243
## VisuoSpatialCongruencyinc:Location         -5.8716     8.9081  34.5078  -0.659
## BlockS:VisuoSpatialCongruencyinc:Location   8.7325     9.7475  38.2307   0.896
##                                           Pr(>|t|)    
## (Intercept)                                < 2e-16 ***
## BlockS                                       0.562    
## VisuoSpatialCongruencyinc                 1.79e-06 ***
## Location                                     0.880    
## BlockS:VisuoSpatialCongruencyinc             0.981    
## BlockS:Location                              0.809    
## VisuoSpatialCongruencyinc:Location           0.514    
## BlockS:VisuoSpatialCongruencyinc:Location    0.376    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) BlockS VsSptC Locatn BlS:VSC BlcS:L VsSC:L
## BlockS      -0.537                                           
## VsSptlCngrn  0.027 -0.079                                    
## Location     0.647 -0.745  0.023                             
## BlckS:VsSpC -0.070 -0.039 -0.825 -0.030                      
## BlockS:Lctn -0.377  0.637 -0.057 -0.583  0.007               
## VsSptlCng:L  0.019 -0.037  0.797  0.028 -0.750  -0.070       
## BlckS:VSC:L -0.030 -0.003 -0.602 -0.047  0.704  -0.093 -0.758
summary(lmm_model_HandLoss)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: RTNoOutlier ~ Block * VisuoSpatialCongruency * HandLoss + (1 +  
##     Block * VisuoSpatialCongruency | Subject)
##    Data: SRHI
## Control: lmerControl(optimizer = "bobyqa")
## 
## REML criterion at convergence: 28728
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.0739 -0.5713 -0.1275  0.3832  5.9447 
## 
## Random effects:
##  Groups   Name                             Variance Std.Dev. Corr             
##  Subject  (Intercept)                       8833     93.99                    
##           BlockS                            2098     45.81   -0.01            
##           VisuoSpatialCongruencyinc         3415     58.44    0.10 -0.44      
##           BlockS:VisuoSpatialCongruencyinc  2092     45.74   -0.30  0.35 -0.55
##  Residual                                  11568    107.55                    
## Number of obs: 2340, groups:  Subject, 33
## 
## Fixed effects:
##                                           Estimate Std. Error       df t value
## (Intercept)                               322.7822    16.9252  30.4972  19.071
## BlockS                                      9.9318    10.0556  29.4520   0.988
## VisuoSpatialCongruencyinc                 123.1672    12.0501  32.1588  10.221
## HandLoss                                   -0.7772     7.5941  32.0154  -0.102
## BlockS:VisuoSpatialCongruencyinc          -13.4481    12.0373  32.3338  -1.117
## BlockS:HandLoss                            -1.4387     8.5358  32.0319  -0.169
## VisuoSpatialCongruencyinc:HandLoss          0.7334     8.6994  32.9116   0.084
## BlockS:VisuoSpatialCongruencyinc:HandLoss   8.3474     9.9661  39.6166   0.838
##                                           Pr(>|t|)    
## (Intercept)                                < 2e-16 ***
## BlockS                                       0.331    
## VisuoSpatialCongruencyinc                 1.25e-11 ***
## HandLoss                                     0.919    
## BlockS:VisuoSpatialCongruencyinc             0.272    
## BlockS:HandLoss                              0.867    
## VisuoSpatialCongruencyinc:HandLoss           0.933    
## BlockS:VisuoSpatialCongruencyinc:HandLoss    0.407    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) BlockS VsSptC HndLss BlS:VSC BlS:HL VSC:HL
## BlockS      -0.116                                           
## VsSptlCngrn -0.011 -0.140                                    
## HandLoss    -0.029  0.019  0.001                             
## BlckS:VsSpC -0.098 -0.120 -0.596  0.001                      
## BlckS:HndLs  0.017 -0.070  0.003 -0.596  0.008               
## VsSptlCn:HL  0.000  0.004 -0.042  0.028  0.029  -0.061       
## BlcS:VSC:HL  0.001  0.009  0.029 -0.041 -0.050  -0.090 -0.744

Since the models are not singular, we can continue to explore the data through post-hoc comparisons.

# Means of Block * VisuoSpatialCongruency interaction
emmeans_interaction_Ownership <- emmeans(lmm_model_Ownership, ~ Block * VisuoSpatialCongruency| Ownership)
emmeans_interaction_Ownership2 <- emmeans(lmm_model_Ownership, ~ Block * Ownership| VisuoSpatialCongruency)
emmeans_interaction_Ownership3 <- emmeans(lmm_model_Ownership, ~ VisuoSpatialCongruency * Ownership| Block)

emmeans_interaction_Location <- emmeans(lmm_model_Location, ~ Block * VisuoSpatialCongruency| Location)
emmeans_interaction_Location2 <- emmeans(lmm_model_Location, ~ Block * Location| VisuoSpatialCongruency)
emmeans_interaction_Location3 <- emmeans(lmm_model_Location, ~ VisuoSpatialCongruency * Location| Block)

emmeans_interaction_HandLoss <- emmeans(lmm_model_HandLoss, ~ Block * VisuoSpatialCongruency| HandLoss)
emmeans_interaction_HandLoss2 <- emmeans(lmm_model_HandLoss, ~ Block * HandLoss| VisuoSpatialCongruency)
emmeans_interaction_HandLoss3 <- emmeans(lmm_model_HandLoss, ~ VisuoSpatialCongruency * HandLoss| Block)

# Means of Block
emmeans_block_Ownership <- emmeans(lmm_model_Ownership, ~ Block| Ownership)
## NOTE: Results may be misleading due to involvement in interactions
emmeans_block_Location <- emmeans(lmm_model_Location, ~ Block| Location)
## NOTE: Results may be misleading due to involvement in interactions
emmeans_block_HandLoss <- emmeans(lmm_model_HandLoss, ~ Block| HandLoss)
## NOTE: Results may be misleading due to involvement in interactions
# Means of VisuoSpatialCongruency
emmeans_visuo_Ownership <- emmeans(lmm_model_Ownership, ~ VisuoSpatialCongruency| Ownership)
## NOTE: Results may be misleading due to involvement in interactions
emmeans_visuo_Location <- emmeans(lmm_model_Location, ~ VisuoSpatialCongruency| Location)
## NOTE: Results may be misleading due to involvement in interactions
emmeans_visuo_HandLoss <- emmeans(lmm_model_HandLoss, ~ VisuoSpatialCongruency| HandLoss)
## NOTE: Results may be misleading due to involvement in interactions
#
# Post hoc comparisons of Block * VisuoSpatialCongruency
posthoc_interaction_Ownership <- pairs(emmeans_interaction_Ownership, adjust = "bonferroni")
posthoc_interaction_Ownership2 <- pairs(emmeans_interaction_Ownership2, adjust = "bonferroni")
posthoc_interaction_Ownership3 <- pairs(emmeans_interaction_Ownership3, adjust = "bonferroni")

posthoc_interaction_Location <- pairs(emmeans_interaction_Location, adjust = "bonferroni")
posthoc_interaction_Location2 <- pairs(emmeans_interaction_Location2, adjust = "bonferroni")
posthoc_interaction_Location3 <- pairs(emmeans_interaction_Location3, adjust = "bonferroni")

posthoc_interaction_HandLoss <- pairs(emmeans_interaction_HandLoss, adjust = "bonferroni")
posthoc_interaction_HandLoss2 <- pairs(emmeans_interaction_HandLoss2, adjust = "bonferroni")
posthoc_interaction_HandLoss3 <- pairs(emmeans_interaction_HandLoss3, adjust = "bonferroni")


# Post hoc comparisons of Block 
posthoc_block_Ownership <- contrast(emmeans_block_Ownership, adjust = "bonferroni")
posthoc_block_Location <- contrast(emmeans_block_Location, adjust = "bonferroni")
posthoc_block_HandLoss <- contrast(emmeans_block_HandLoss, adjust = "bonferroni")

# Post hoc comparisons of VisuoSpatialCongruency 
posthoc_visuo_Ownership <- contrast(emmeans_visuo_Ownership, adjust = "bonferroni")
posthoc_visuo_Location <- contrast(emmeans_visuo_Location, adjust = "bonferroni")
posthoc_visuo_HandLoss <- contrast(emmeans_visuo_HandLoss, adjust = "bonferroni")

#
#post hoc summary of Block * VisuoSpatialCongruency
summary(posthoc_interaction_Ownership)
## Ownership = -1.67:
##  contrast        estimate   SE   df t.ratio p.value
##  A cong - S cong    -6.75 11.0 31.6  -0.612  1.0000
##  A cong - A inc   -120.61 12.1 31.4  -9.956  <.0001
##  A cong - S inc   -113.39 12.3 32.1  -9.252  <.0001
##  S cong - A inc   -113.86 17.4 33.0  -6.560  <.0001
##  S cong - S inc   -106.63 10.5 31.0 -10.181  <.0001
##  A inc - S inc       7.23 15.4 32.5   0.468  1.0000
## 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 6 tests
summary(posthoc_interaction_Ownership2)
## VisuoSpatialCongruency = cong:
##  contrast                                                        estimate   SE
##  (A Ownership-1.66863247863248) - (S Ownership-1.66863247863248)    -6.75 11.0
##    df t.ratio p.value
##  31.6  -0.612  0.5447
## 
## VisuoSpatialCongruency = inc:
##  contrast                                                        estimate   SE
##  (A Ownership-1.66863247863248) - (S Ownership-1.66863247863248)     7.23 15.4
##    df t.ratio p.value
##  32.5   0.468  0.6426
## 
## Degrees-of-freedom method: kenward-roger
summary(posthoc_interaction_Ownership3)
## Block = A:
##  contrast                                                             estimate
##  (cong Ownership-1.66863247863248) - (inc Ownership-1.66863247863248)     -121
##    SE   df t.ratio p.value
##  12.1 31.4  -9.956  <.0001
## 
## Block = S:
##  contrast                                                             estimate
##  (cong Ownership-1.66863247863248) - (inc Ownership-1.66863247863248)     -107
##    SE   df t.ratio p.value
##  10.5 31.0 -10.181  <.0001
## 
## Degrees-of-freedom method: kenward-roger
summary(posthoc_interaction_Location)
## Location = -1.21:
##  contrast        estimate   SE   df t.ratio p.value
##  A cong - S cong    -7.20 13.0 36.4  -0.554  1.0000
##  A cong - A inc   -120.04 13.0 31.7  -9.247  <.0001
##  A cong - S inc   -116.17 14.9 38.4  -7.792  <.0001
##  S cong - A inc   -112.84 19.2 38.7  -5.888  <.0001
##  S cong - S inc   -108.97 11.5 31.3  -9.443  <.0001
##  A inc - S inc       3.87 18.0 38.4   0.215  1.0000
## 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 6 tests
summary(posthoc_interaction_Location2)
## VisuoSpatialCongruency = cong:
##  contrast                                                    estimate SE   df
##  (A Location-1.2133547008547) - (S Location-1.2133547008547)    -7.20 13 36.4
##  t.ratio p.value
##   -0.554  0.5828
## 
## VisuoSpatialCongruency = inc:
##  contrast                                                    estimate SE   df
##  (A Location-1.2133547008547) - (S Location-1.2133547008547)     3.87 18 38.4
##  t.ratio p.value
##    0.215  0.8311
## 
## Degrees-of-freedom method: kenward-roger
summary(posthoc_interaction_Location3)
## Block = A:
##  contrast                                                         estimate   SE
##  (cong Location-1.2133547008547) - (inc Location-1.2133547008547)     -120 13.0
##    df t.ratio p.value
##  31.7  -9.247  <.0001
## 
## Block = S:
##  contrast                                                         estimate   SE
##  (cong Location-1.2133547008547) - (inc Location-1.2133547008547)     -109 11.5
##    df t.ratio p.value
##  31.3  -9.443  <.0001
## 
## Degrees-of-freedom method: kenward-roger
summary(posthoc_interaction_HandLoss)
## HandLoss = 0.0573:
##  contrast        estimate   SE   df t.ratio p.value
##  A cong - S cong    -9.85 10.0 30.0  -0.981  1.0000
##  A cong - A inc   -123.21 12.0 30.9 -10.228  <.0001
##  A cong - S inc   -120.09 12.4 30.2  -9.653  <.0001
##  S cong - A inc   -113.36 16.7 30.5  -6.780  <.0001
##  S cong - S inc   -110.24 10.8 31.0 -10.197  <.0001
##  A inc - S inc       3.12 14.7 30.1   0.212  1.0000
## 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 6 tests
summary(posthoc_interaction_HandLoss2)
## VisuoSpatialCongruency = cong:
##  contrast                                                    estimate   SE   df
##  A HandLoss0.0572649572649573 - S HandLoss0.0572649572649573    -9.85 10.0 30.0
##  t.ratio p.value
##   -0.981  0.3342
## 
## VisuoSpatialCongruency = inc:
##  contrast                                                    estimate   SE   df
##  A HandLoss0.0572649572649573 - S HandLoss0.0572649572649573     3.12 14.7 30.1
##  t.ratio p.value
##    0.212  0.8335
## 
## Degrees-of-freedom method: kenward-roger
summary(posthoc_interaction_HandLoss3)
## Block = A:
##  contrast                                                         estimate   SE
##  cong HandLoss0.0572649572649573 - inc HandLoss0.0572649572649573     -123 12.0
##    df t.ratio p.value
##  30.9 -10.228  <.0001
## 
## Block = S:
##  contrast                                                         estimate   SE
##  cong HandLoss0.0572649572649573 - inc HandLoss0.0572649572649573     -110 10.8
##    df t.ratio p.value
##  31.0 -10.197  <.0001
## 
## Degrees-of-freedom method: kenward-roger
#post hoc summary of Block 
summary(posthoc_block_Ownership)
## Ownership = -1.67:
##  contrast estimate   SE   df t.ratio p.value
##  A effect    0.118 5.89 32.1   0.020  1.0000
##  S effect   -0.118 5.89 32.1  -0.020  1.0000
## 
## Results are averaged over the levels of: VisuoSpatialCongruency 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests
summary(posthoc_block_Location)
## Location = -1.21:
##  contrast estimate   SE   df t.ratio p.value
##  A effect   -0.831 6.99 37.5  -0.119  1.0000
##  S effect    0.831 6.99 37.5   0.119  1.0000
## 
## Results are averaged over the levels of: VisuoSpatialCongruency 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests
summary(posthoc_block_HandLoss)
## HandLoss = 0.0573:
##  contrast estimate   SE   df t.ratio p.value
##  A effect    -1.68 5.53 30.1  -0.304  1.0000
##  S effect     1.68 5.53 30.1   0.304  1.0000
## 
## Results are averaged over the levels of: VisuoSpatialCongruency 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests
#post hoc summary of VisuoSpatialCongruency
summary(posthoc_visuo_Ownership)
## Ownership = -1.67:
##  contrast    estimate   SE   df t.ratio p.value
##  cong effect    -56.8 4.67 32.4 -12.175  <.0001
##  inc effect      56.8 4.67 32.4  12.175  <.0001
## 
## Results are averaged over the levels of: Block 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests
summary(posthoc_visuo_Location)
## Location = -1.21:
##  contrast    estimate   SE   df t.ratio p.value
##  cong effect    -57.3 4.98 35.1 -11.489  <.0001
##  inc effect      57.3 4.98 35.1  11.489  <.0001
## 
## Results are averaged over the levels of: Block 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests
summary(posthoc_visuo_HandLoss)
## HandLoss = 0.0573:
##  contrast    estimate   SE df t.ratio p.value
##  cong effect    -58.4 4.87 31 -11.989  <.0001
##  inc effect      58.4 4.87 31  11.989  <.0001
## 
## Results are averaged over the levels of: Block 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: bonferroni method for 2 tests