This vignette shows how to estimate interaction models, with both continuous and ordered (categorical) data.

Model Syntax

m <- '
  X =~ x1 + x2 + x3
  Z =~ z1 + z2 + z3
  Y =~ y1 + y2 + y3

  Y ~ X + Z + X:Z
'

Continuous Indicators

fit_cont <- pls(
  m,
  data      = modsem::oneInt,
  bootstrap = TRUE,
  boot.R    = 50
)
summary(fit_cont)
#> plssem (0.1.2) ended normally after 3 iterations
#> 
#>   Estimator                                       PLSc
#>   Link                                          LINEAR
#>                                                       
#>   Number of observations                          2000
#>   Number of iterations                               3
#>   Number of latent variables                         3
#>   Number of observed variables                       9
#> 
#> Fit Measures:
#>   Chi-Square                                    56.757
#>   Degrees of Freedom                                21
#>   SRMR                                           0.006
#>   RMSEA                                          0.029
#> 
#> R-squared (indicators):
#>   x1                                             0.863
#>   x2                                             0.819
#>   x3                                             0.809
#>   z1                                             0.830
#>   z2                                             0.827
#>   z3                                             0.843
#>   y1                                             0.934
#>   y2                                             0.919
#>   y3                                             0.923
#> 
#> R-squared (latents):
#>   Y                                              0.604
#> 
#> Latent Variables:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>   X =~          
#>     x1              0.929      0.012   75.834    0.000
#>     x2              0.905      0.015   61.806    0.000
#>     x3              0.899      0.013   70.530    0.000
#>   Z =~          
#>     z1              0.911      0.011   79.973    0.000
#>     z2              0.909      0.015   61.911    0.000
#>     z3              0.918      0.012   77.681    0.000
#>   Y =~          
#>     y1              0.966      0.006  174.278    0.000
#>     y2              0.959      0.008  116.493    0.000
#>     y3              0.961      0.006  147.962    0.000
#> 
#> Regressions:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>   Y ~           
#>     X               0.423      0.020   21.233    0.000
#>     Z               0.361      0.017   21.096    0.000
#>     X:Z             0.452      0.017   27.255    0.000
#> 
#> Covariances:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>   X ~~          
#>     Z               0.201      0.023    8.869    0.000
#>     X:Z             0.018      0.040    0.455    0.649
#>   Z ~~          
#>     X:Z             0.060      0.048    1.267    0.205
#> 
#> Variances:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>     X               1.000      0.022   45.244    0.000
#>     Z               1.000      0.033   30.396    0.000
#>    .Y               0.396      0.017   23.234    0.000
#>     X:Z             1.013      0.061   16.594    0.000
#>    .x1              0.137      0.023    6.034    0.000
#>    .x2              0.181      0.026    6.834    0.000
#>    .x3              0.191      0.023    8.333    0.000
#>    .z1              0.170      0.021    8.181    0.000
#>    .z2              0.173      0.027    6.493    0.000
#>    .z3              0.157      0.022    7.226    0.000
#>    .y1              0.066      0.011    6.167    0.000
#>    .y2              0.081      0.016    5.157    0.000
#>    .y3              0.077      0.012    6.201    0.000

Ordered Indicators

fit_ord <- pls(
  m,
  data      = oneIntOrdered,
  bootstrap = TRUE,
  boot.R    = 50,
  ordered   = colnames(oneIntOrdered) # explicitly specify variables as ordered
)
summary(fit_ord)
#> plssem (0.1.2) ended normally after 45 iterations
#> 
#>   Estimator                                  MCOrdPLSc
#>   Link                                          PROBIT
#>                                                       
#>   Number of observations                          2000
#>   Number of iterations                              45
#>   Number of latent variables                         3
#>   Number of observed variables                       9
#> 
#> Fit Measures:
#>   Chi-Square                                        NA
#>   Degrees of Freedom                                NA
#>   SRMR                                              NA
#>   RMSEA                                             NA
#> 
#> R-squared (indicators):
#>   x1                                             0.930
#>   x2                                             0.900
#>   x3                                             0.906
#>   z1                                             0.936
#>   z2                                             0.901
#>   z3                                             0.911
#>   y1                                             0.972
#>   y2                                             0.952
#>   y3                                             0.962
#> 
#> R-squared (latents):
#>   Y                                              0.568
#> 
#> Latent Variables:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>   X =~          
#>     x1              0.930      0.008  122.526    0.000
#>     x2              0.900      0.007  135.858    0.000
#>     x3              0.906      0.008  117.476    0.000
#>   Z =~          
#>     z1              0.936      0.007  135.801    0.000
#>     z2              0.901      0.007  121.548    0.000
#>     z3              0.911      0.006  157.077    0.000
#>   Y =~          
#>     y1              0.972      0.004  224.738    0.000
#>     y2              0.952      0.006  171.089    0.000
#>     y3              0.962      0.005  203.246    0.000
#> 
#> Regressions:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>   Y ~           
#>     X               0.416      0.019   21.548    0.000
#>     Z               0.357      0.022   15.978    0.000
#>     X:Z             0.446      0.021   21.091    0.000
#> 
#> Covariances:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>   X ~~          
#>     Z               0.193      0.026    7.317    0.000
#>     X:Z             0.009      0.017    0.515    0.606
#>   Z ~~          
#>     X:Z             0.023      0.015    1.503    0.133
#> 
#> Variances:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>     X               1.000                             
#>     Z               1.000                             
#>    .Y               0.432      0.033   13.145    0.000
#>     X:Z             1.000                             
#>    .x1              0.070      0.008    9.166    0.000
#>    .x2              0.100      0.007   15.149    0.000
#>    .x3              0.094      0.008   12.253    0.000
#>    .z1              0.064      0.007    9.251    0.000
#>    .z2              0.099      0.007   13.406    0.000
#>    .z3              0.089      0.006   15.388    0.000
#>    .y1              0.028      0.004    6.549    0.000
#>    .y2              0.048      0.006    8.651    0.000
#>    .y3              0.038      0.005    7.992    0.000