This vignette shows how to estimate interaction models, with both continuous and ordered (categorical) data.
fit_cont <- pls(
m,
data = modsem::oneInt,
bootstrap = TRUE,
boot.R = 50
)
summary(fit_cont)
#> plssem (0.1.4) 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 24
#> SRMR 0.006
#> RMSEA 0.026
#>
#> 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
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.4) ended normally after 53 iterations
#> Estimator MCOrdPLSc
#> Link PROBIT
#>
#> Number of observations 2000
#> Number of iterations 53
#> Number of latent variables 3
#> Number of observed variables 9
#>
#> Fit Measures:
#> Chi-Square 20.432
#> Degrees of Freedom 24
#> SRMR 0.012
#> RMSEA 0.000
#>
#> R-squared (indicators):
#> x1 0.866
#> x2 0.809
#> x3 0.819
#> z1 0.876
#> z2 0.812
#> z3 0.828
#> y1 0.944
#> y2 0.907
#> y3 0.925
#>
#> R-squared (latents):
#> Y 0.568
#>
#> Latent Variables:
#> Estimate Std.Error z.value P(>|z|)
#> X =~
#> x1 0.931 0.008 116.136 0.000
#> x2 0.899 0.006 144.117 0.000
#> x3 0.905 0.008 120.085 0.000
#> Z =~
#> z1 0.936 0.007 131.513 0.000
#> z2 0.901 0.009 103.157 0.000
#> z3 0.910 0.009 102.644 0.000
#> Y =~
#> y1 0.971 0.004 225.121 0.000
#> y2 0.952 0.005 199.980 0.000
#> y3 0.962 0.005 192.142 0.000
#>
#> Regressions:
#> Estimate Std.Error z.value P(>|z|)
#> Y ~
#> X 0.418 0.020 20.766 0.000
#> Z 0.356 0.019 18.923 0.000
#> X:Z 0.447 0.019 23.042 0.000
#>
#> Covariances:
#> Estimate Std.Error z.value P(>|z|)
#> X ~~
#> Z 0.195 0.022 8.916 0.000
#> X:Z 0.003
#> Z ~~
#> X:Z 0.008
#>
#> Thresholds:
#> Estimate Std.Error z.value P(>|z|)
#> x1|t1 -2.147 0.102 -20.948 0.000
#> x1|t2 -0.830 0.028 -29.652 0.000
#> x1|t3 0.075 0.022 3.464 0.001
#> x1|t4 0.898 0.036 24.872 0.000
#> x1|t5 1.871 0.050 37.199 0.000
#> x2|t1 -2.555 0.065 -39.115 0.000
#> x2|t2 -1.570 0.046 -34.084 0.000
#> x2|t3 -0.420 0.025 -16.820 0.000
#> x2|t4 0.412 0.033 12.539 0.000
#> x2|t5 1.307 0.050 26.383 0.000
#> x2|t6 2.548 0.071 35.905 0.000
#> x3|t1 -2.370 0.064 -36.961 0.000
#> x3|t2 -1.253 0.037 -33.441 0.000
#> x3|t3 -0.087 0.023 -3.806 0.000
#> x3|t4 0.747 0.034 22.126 0.000
#> x3|t5 2.107 0.081 26.090 0.000
#> x3|t6 2.782 0.060 46.580 0.000
#> y1|t1 -2.832 0.062 -45.690 0.000
#> y1|t2 -1.496 0.054 -27.484 0.000
#> y1|t3 -0.678 0.023 -29.927 0.000
#> y1|t4 0.498 0.033 14.954 0.000
#> y1|t5 1.597 0.054 29.506 0.000
#> y1|t6 2.592 0.129 20.169 0.000
#> y2|t1 -2.997 0.108 -27.679 0.000
#> y2|t2 -1.653 0.051 -32.513 0.000
#> y2|t3 -0.990 0.029 -34.172 0.000
#> y2|t4 0.294 0.033 8.864 0.000
#> y2|t5 1.068 0.052 20.456 0.000
#> y2|t6 2.319 0.106 21.940 0.000
#> y3|t1 -1.664 0.062 -26.803 0.000
#> y3|t2 -0.849 0.023 -37.494 0.000
#> y3|t3 0.309 0.031 10.086 0.000
#> y3|t4 1.344 0.048 28.292 0.000
#> y3|t5 2.204 0.092 23.993 0.000
#> z1|t1 -2.040 0.075 -27.134 0.000
#> z1|t2 -0.776 0.031 -25.224 0.000
#> z1|t3 0.283 0.026 10.865 0.000
#> z1|t4 0.938 0.031 30.387 0.000
#> z1|t5 2.296 0.117 19.565 0.000
#> z1|t6 3.316 0.053 62.302 0.000
#> z2|t1 -2.894 0.054 -53.196 0.000
#> z2|t2 -1.610 0.046 -35.287 0.000
#> z2|t3 -0.742 0.032 -23.285 0.000
#> z2|t4 0.245 0.028 8.893 0.000
#> z2|t5 1.211 0.033 36.748 0.000
#> z2|t6 2.317 0.125 18.551 0.000
#> z3|t1 -3.343 0.074 -45.090 0.000
#> z3|t2 -1.970 0.072 -27.187 0.000
#> z3|t3 -1.281 0.046 -28.160 0.000
#> z3|t4 -0.205 0.028 -7.279 0.000
#> z3|t5 0.999 0.026 37.923 0.000
#> z3|t6 1.661 0.050 33.350 0.000
#>
#> Variances:
#> Estimate Std.Error z.value P(>|z|)
#> X 1.000
#> Z 1.000
#> .Y 0.432 0.031 14.098 0.000
#> X:Z 1.033
#> .x1 0.134 0.015 8.978 0.000
#> .x2 0.191 0.011 17.028 0.000
#> .x3 0.181 0.014 13.241 0.000
#> .z1 0.124 0.013 9.342 0.000
#> .z2 0.188 0.016 11.932 0.000
#> .z3 0.172 0.016 10.627 0.000
#> .y1 0.056 0.008 6.707 0.000
#> .y2 0.093 0.009 10.279 0.000
#> .y3 0.075 0.010 7.752 0.000