library(readxl)
## Warning: package 'readxl' was built under R version 4.1.3
nickbooty <- read_excel("C:/Users/schoi/Dropbox/PC/Downloads/nickbooty.xlsx")

set reference groups and make R_image and image variable as a factor(categorical)

library(interactions)
## Warning: package 'interactions' was built under R version 4.1.3
nickbooty$R_image <- as.factor(nickbooty$R_image)
nickbooty$R_image <- relevel(nickbooty$R_image, ref = "1")
nickbooty$image <- as.factor(nickbooty$image)
nickbooty$image <- relevel(nickbooty$image, ref = "1")

models and simple slopes

bootymodel1 <- lm(fear ~ R_image*Dis_Prop, data = nickbooty)
summary(bootymodel1)
## 
## Call:
## lm(formula = fear ~ R_image * Dis_Prop, data = nickbooty)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -2.6009 -0.7937 -0.1725  0.7613  3.2841 
## 
## Coefficients:
##                   Estimate Std. Error t value Pr(>|t|)   
## (Intercept)        0.43588    0.41664   1.046  0.29614   
## R_image2          -0.41909    0.65224  -0.643  0.52090   
## R_image3          -0.11986    0.60294  -0.199  0.84253   
## Dis_Prop           0.07147    0.02413   2.962  0.00324 **
## R_image2:Dis_Prop  0.05924    0.03727   1.590  0.11277   
## R_image3:Dis_Prop  0.07135    0.03483   2.048  0.04121 * 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.108 on 384 degrees of freedom
## Multiple R-squared:  0.2462, Adjusted R-squared:  0.2364 
## F-statistic: 25.09 on 5 and 384 DF,  p-value: < 2.2e-16
sim_slopes(bootymodel1, pred = Dis_Prop, modx = R_image, centered = "all")
## Warning: Johnson-Neyman intervals are not available for factor moderators.
## SIMPLE SLOPES ANALYSIS 
## 
## Slope of Dis_Prop when R_image = 3: 
## 
##   Est.   S.E.   t val.      p
## ------ ------ -------- ------
##   0.14   0.03     5.68   0.00
## 
## Slope of Dis_Prop when R_image = 2: 
## 
##   Est.   S.E.   t val.      p
## ------ ------ -------- ------
##   0.13   0.03     4.60   0.00
## 
## Slope of Dis_Prop when R_image = 1: 
## 
##   Est.   S.E.   t val.      p
## ------ ------ -------- ------
##   0.07   0.02     2.96   0.00
bootymodel2 <- lm(disgust ~ R_image*Dis_Prop, data = nickbooty)
summary(bootymodel2)
## 
## Call:
## lm(formula = disgust ~ R_image * Dis_Prop, data = nickbooty)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -3.5478 -0.8037  0.0479  0.7779  3.0479 
## 
## Coefficients:
##                   Estimate Std. Error t value Pr(>|t|)   
## (Intercept)        0.67045    0.42780   1.567  0.11789   
## R_image2           0.24383    0.66970   0.364  0.71599   
## R_image3           0.64672    0.61908   1.045  0.29685   
## Dis_Prop           0.07120    0.02477   2.874  0.00427 **
## R_image2:Dis_Prop  0.06455    0.03826   1.687  0.09243 . 
## R_image3:Dis_Prop  0.07564    0.03577   2.115  0.03509 * 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.138 on 384 degrees of freedom
## Multiple R-squared:  0.4032, Adjusted R-squared:  0.3954 
## F-statistic: 51.88 on 5 and 384 DF,  p-value: < 2.2e-16
sim_slopes(bootymodel2, pred = Dis_Prop, modx = R_image, centered = "all")
## Warning: Johnson-Neyman intervals are not available for factor moderators.
## SIMPLE SLOPES ANALYSIS 
## 
## Slope of Dis_Prop when R_image = 3: 
## 
##   Est.   S.E.   t val.      p
## ------ ------ -------- ------
##   0.15   0.03     5.69   0.00
## 
## Slope of Dis_Prop when R_image = 2: 
## 
##   Est.   S.E.   t val.      p
## ------ ------ -------- ------
##   0.14   0.03     4.65   0.00
## 
## Slope of Dis_Prop when R_image = 1: 
## 
##   Est.   S.E.   t val.      p
## ------ ------ -------- ------
##   0.07   0.02     2.87   0.00
bootymodel3 <- lm(sadness ~ R_image*NFA, data = nickbooty)
summary(bootymodel3)
## 
## Call:
## lm(formula = sadness ~ R_image * NFA, data = nickbooty)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -2.98027 -0.96608 -0.02914  0.97207  2.93302 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)    
## (Intercept)   2.62193    0.58289   4.498 9.09e-06 ***
## R_image2      0.13101    0.77401   0.169   0.8657    
## R_image3     -0.52501    0.82110  -0.639   0.5230    
## NFA          -0.01261    0.01118  -1.129   0.2598    
## R_image2:NFA  0.01846    0.01516   1.218   0.2239    
## R_image3:NFA  0.04072    0.01618   2.517   0.0122 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.248 on 384 degrees of freedom
## Multiple R-squared:  0.2119, Adjusted R-squared:  0.2016 
## F-statistic: 20.65 on 5 and 384 DF,  p-value: < 2.2e-16
sim_slopes(bootymodel3, pred = NFA, modx = R_image, centered = "all")
## Warning: Johnson-Neyman intervals are not available for factor moderators.
## SIMPLE SLOPES ANALYSIS 
## 
## Slope of NFA when R_image = 3: 
## 
##   Est.   S.E.   t val.      p
## ------ ------ -------- ------
##   0.03   0.01     2.40   0.02
## 
## Slope of NFA when R_image = 2: 
## 
##   Est.   S.E.   t val.      p
## ------ ------ -------- ------
##   0.01   0.01     0.57   0.57
## 
## Slope of NFA when R_image = 1: 
## 
##    Est.   S.E.   t val.      p
## ------- ------ -------- ------
##   -0.01   0.01    -1.13   0.26
bootymodel4 <- lm(anger ~ R_image*Purity, data = nickbooty)
summary(bootymodel4)
## 
## Call:
## lm(formula = anger ~ R_image * Purity, data = nickbooty)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -2.0875 -0.7125 -0.5199  0.7764  3.4508 
## 
## Coefficients:
##                  Estimate Std. Error t value Pr(>|t|)    
## (Intercept)      1.666739   0.217195   7.674 1.39e-13 ***
## R_image2        -0.204539   0.312316  -0.655   0.5129    
## R_image3         0.188787   0.313067   0.603   0.5468    
## Purity          -0.004896   0.013015  -0.376   0.7070    
## R_image2:Purity  0.046614   0.018281   2.550   0.0112 *  
## R_image3:Purity  0.045964   0.018933   2.428   0.0157 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.18 on 384 degrees of freedom
## Multiple R-squared:  0.1231, Adjusted R-squared:  0.1117 
## F-statistic: 10.78 on 5 and 384 DF,  p-value: 1.022e-09
sim_slopes(bootymodel4, pred = Purity, modx = R_image, centered = "all")
## Warning: Johnson-Neyman intervals are not available for factor moderators.
## SIMPLE SLOPES ANALYSIS 
## 
## Slope of Purity when R_image = 3: 
## 
##   Est.   S.E.   t val.      p
## ------ ------ -------- ------
##   0.04   0.01     2.99   0.00
## 
## Slope of Purity when R_image = 2: 
## 
##   Est.   S.E.   t val.      p
## ------ ------ -------- ------
##   0.04   0.01     3.25   0.00
## 
## Slope of Purity when R_image = 1: 
## 
##    Est.   S.E.   t val.      p
## ------- ------ -------- ------
##   -0.00   0.01    -0.38   0.71
bootymodel5 <- lm(fear ~ image*Care, data = nickbooty)
summary(bootymodel5)
## 
## Call:
## lm(formula = fear ~ image * Care, data = nickbooty)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.9427 -0.7762 -0.3495  1.1405  3.2203 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)   
## (Intercept)  0.96605    0.47304   2.042  0.04181 * 
## image2       2.12645    0.65388   3.252  0.00125 **
## image3      -0.07375    0.67491  -0.109  0.91305   
## Care         0.05887    0.02064   2.852  0.00458 **
## image2:Care -0.07552    0.02890  -2.613  0.00932 **
## image3:Care -0.02600    0.02930  -0.888  0.37536   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.177 on 384 degrees of freedom
## Multiple R-squared:  0.1491, Adjusted R-squared:  0.138 
## F-statistic: 13.46 on 5 and 384 DF,  p-value: 4.201e-12
sim_slopes(bootymodel5, pred = Care, modx = image, centered = "all")
## Warning: Johnson-Neyman intervals are not available for factor moderators.
## SIMPLE SLOPES ANALYSIS 
## 
## Slope of Care when image = 3: 
## 
##   Est.   S.E.   t val.      p
## ------ ------ -------- ------
##   0.03   0.02     1.58   0.11
## 
## Slope of Care when image = 2: 
## 
##    Est.   S.E.   t val.      p
## ------- ------ -------- ------
##   -0.02   0.02    -0.82   0.41
## 
## Slope of Care when image = 1: 
## 
##   Est.   S.E.   t val.      p
## ------ ------ -------- ------
##   0.06   0.02     2.85   0.00
bootymodel6 <- lm(anger ~ image*Care, data = nickbooty)
summary(bootymodel6)
## 
## Call:
## lm(formula = anger ~ image * Care, data = nickbooty)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.6765 -0.7877 -0.4103  0.6839  3.5094 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)   
## (Intercept)  0.98870    0.48091   2.056  0.04047 * 
## image2       1.75438    0.66477   2.639  0.00865 **
## image3      -0.07250    0.68615  -0.106  0.91591   
## Care         0.05019    0.02099   2.392  0.01726 * 
## image2:Care -0.06350    0.02938  -2.161  0.03128 * 
## image3:Care -0.02014    0.02979  -0.676  0.49945   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.197 on 384 degrees of freedom
## Multiple R-squared:  0.09749,    Adjusted R-squared:  0.08574 
## F-statistic: 8.296 on 5 and 384 DF,  p-value: 1.848e-07
sim_slopes(bootymodel6, pred = Care, modx = image, centered = "all")
## Warning: Johnson-Neyman intervals are not available for factor moderators.
## SIMPLE SLOPES ANALYSIS 
## 
## Slope of Care when image = 3: 
## 
##   Est.   S.E.   t val.      p
## ------ ------ -------- ------
##   0.03   0.02     1.42   0.16
## 
## Slope of Care when image = 2: 
## 
##    Est.   S.E.   t val.      p
## ------- ------ -------- ------
##   -0.01   0.02    -0.65   0.52
## 
## Slope of Care when image = 1: 
## 
##   Est.   S.E.   t val.      p
## ------ ------ -------- ------
##   0.05   0.02     2.39   0.02
bootymodel7 <- lm(disgust ~ image*Exper, data = nickbooty)
summary(bootymodel7)
## 
## Call:
## lm(formula = disgust ~ image * Exper, data = nickbooty)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -3.1494 -0.8665  0.1189  0.9101  3.1700 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)    
## (Intercept)   2.96786    0.27494  10.795  < 2e-16 ***
## image2        1.57311    0.39423   3.990  7.9e-05 ***
## image3       -1.04305    0.41140  -2.535  0.01163 *  
## Exper         0.03756    0.03175   1.183  0.23747    
## image2:Exper -0.13546    0.04695  -2.885  0.00413 ** 
## image3:Exper -0.04486    0.04723  -0.950  0.34279    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.212 on 384 degrees of freedom
## Multiple R-squared:  0.323,  Adjusted R-squared:  0.3142 
## F-statistic: 36.64 on 5 and 384 DF,  p-value: < 2.2e-16
sim_slopes(bootymodel7, pred = Exper, modx = image, centered = "all")
## Warning: Johnson-Neyman intervals are not available for factor moderators.
## SIMPLE SLOPES ANALYSIS 
## 
## Slope of Exper when image = 3: 
## 
##    Est.   S.E.   t val.      p
## ------- ------ -------- ------
##   -0.01   0.03    -0.21   0.83
## 
## Slope of Exper when image = 2: 
## 
##    Est.   S.E.   t val.      p
## ------- ------ -------- ------
##   -0.10   0.03    -2.83   0.00
## 
## Slope of Exper when image = 1: 
## 
##   Est.   S.E.   t val.      p
## ------ ------ -------- ------
##   0.04   0.03     1.18   0.24