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,
  sample    = 500
)
summary(fit_cont)
#> plssem (0.1.0) 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
#> 
#> 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.691    0.000
#>     x2              0.905      0.014   64.736    0.000
#>     x3              0.899      0.013   67.269    0.000
#>   Z =~          
#>     z1              0.911      0.014   65.903    0.000
#>     z2              0.909      0.016   57.739    0.000
#>     z3              0.918      0.014   66.178    0.000
#>   Y =~          
#>     y1              0.966      0.006  154.021    0.000
#>     y2              0.959      0.007  128.850    0.000
#>     y3              0.961      0.007  133.048    0.000
#> 
#> Regressions:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>   Y ~           
#>     X               0.423      0.018   23.803    0.000
#>     Z               0.361      0.017   20.908    0.000
#>     X:Z             0.452      0.017   26.011    0.000
#> 
#> Covariances:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>   X ~~          
#>     Z               0.201      0.023    8.791    0.000
#>     X:Z             0.018      0.031    0.592    0.554
#>   Z ~~          
#>     X:Z             0.060      0.037    1.645    0.100
#> 
#> Variances:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>     X               1.000                             
#>     Z               1.000                             
#>    .Y               0.396      0.020   19.996    0.000
#>     X:Z             1.013      0.049   20.707    0.000
#>    .x1              0.137      0.023    6.025    0.000
#>    .x2              0.181      0.025    7.159    0.000
#>    .x3              0.191      0.024    7.944    0.000
#>    .z1              0.170      0.025    6.773    0.000
#>    .z2              0.173      0.029    6.025    0.000
#>    .z3              0.157      0.025    6.179    0.000
#>    .y1              0.066      0.012    5.463    0.000
#>    .y2              0.081      0.014    5.681    0.000
#>    .y3              0.077      0.014    5.584    0.000

Ordered Indicators

fit_ord <- pls(
  m,
  data      = oneIntOrdered,
  bootstrap = TRUE,
  sample    = 500,
  ordered   = colnames(oneIntOrdered) # explicitly specify variables as ordered
)
summary(fit_ord)
#> plssem (0.1.0) ended normally after 59 iterations
#> 
#>   Estimator                                  MCOrdPLSc
#>   Link                                          PROBIT
#>                                                       
#>   Number of observations                          2000
#>   Number of iterations                              59
#>   Number of latent variables                         3
#>   Number of observed variables                       9
#> 
#> R-squared (indicators):
#>   x1                                             0.931
#>   x2                                             0.899
#>   x3                                             0.906
#>   z1                                             0.936
#>   z2                                             0.901
#>   z3                                             0.912
#>   y1                                             0.972
#>   y2                                             0.952
#>   y3                                             0.962
#> 
#> R-squared (latents):
#>   Y                                              0.475
#> 
#> Latent Variables:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>   X =~          
#>     x1              0.931      0.007  129.287    0.000
#>     x2              0.899      0.008  113.260    0.000
#>     x3              0.906      0.008  119.087    0.000
#>   Z =~          
#>     z1              0.936      0.007  134.885    0.000
#>     z2              0.901      0.008  113.906    0.000
#>     z3              0.912      0.007  125.291    0.000
#>   Y =~          
#>     y1              0.972      0.004  261.184    0.000
#>     y2              0.952      0.005  182.991    0.000
#>     y3              0.962      0.004  216.187    0.000
#> 
#> Regressions:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>   Y ~           
#>     X               0.416      0.019   21.706    0.000
#>     Z               0.356      0.020   17.951    0.000
#>     X:Z             0.447      0.020   22.598    0.000
#> 
#> Covariances:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>   X ~~          
#>     Z               0.196      0.025    7.981    0.000
#>     X:Z            -0.018      0.010   -1.745    0.081
#>   Z ~~          
#>     X:Z            -0.008      0.010   -0.759    0.448
#> 
#> Variances:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>     X               1.000                             
#>     Z               1.000                             
#>    .Y               0.525      0.018   29.155    0.000
#>     X:Z             1.020      0.035   28.924    0.000
#>    .x1              0.069      0.007    9.636    0.000
#>    .x2              0.101      0.008   12.658    0.000
#>    .x3              0.094      0.008   12.401    0.000
#>    .z1              0.064      0.007    9.235    0.000
#>    .z2              0.099      0.008   12.532    0.000
#>    .z3              0.088      0.007   12.112    0.000
#>    .y1              0.028      0.004    7.577    0.000
#>    .y2              0.048      0.005    9.242    0.000
#>    .y3              0.038      0.004    8.564    0.000