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.3) 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 74.368 0.000
#> x2 0.905 0.016 57.923 0.000
#> x3 0.899 0.013 66.958 0.000
#> Z =~
#> z1 0.911 0.014 64.254 0.000
#> z2 0.909 0.015 60.211 0.000
#> z3 0.918 0.015 61.430 0.000
#> Y =~
#> y1 0.966 0.006 156.262 0.000
#> y2 0.959 0.006 156.584 0.000
#> y3 0.961 0.007 144.403 0.000
#>
#> Regressions:
#> Estimate Std.Error z.value P(>|z|)
#> Y ~
#> X 0.423 0.014 29.664 0.000
#> Z 0.361 0.014 25.691 0.000
#> X:Z 0.452 0.017 26.335 0.000
#>
#> Covariances:
#> Estimate Std.Error z.value P(>|z|)
#> X ~~
#> Z 0.201 0.023 8.609 0.000
#> X:Z 0.018 0.040 0.454 0.650
#> Z ~~
#> X:Z 0.060 0.042 1.429 0.153
#>
#> Variances:
#> Estimate Std.Error z.value P(>|z|)
#> X 1.000 0.029 34.971 0.000
#> Z 1.000 0.031 31.841 0.000
#> .Y 0.396 0.014 28.534 0.000
#> X:Z 1.013 0.053 19.140 0.000
#> .x1 0.137 0.023 5.911 0.000
#> .x2 0.181 0.028 6.408 0.000
#> .x3 0.191 0.024 7.873 0.000
#> .z1 0.170 0.026 6.601 0.000
#> .z2 0.173 0.028 6.278 0.000
#> .z3 0.157 0.027 5.741 0.000
#> .y1 0.066 0.012 5.541 0.000
#> .y2 0.081 0.012 6.912 0.000
#> .y3 0.077 0.013 6.061 0.000fit_ord <- pls(
m,
data = oneIntOrdered,
bootstrap = TRUE,
boot.R = 50,
ordered = colnames(oneIntOrdered) # explicitly specify variables as ordered
)
summary(fit_ord)
#> plssem (0.1.3) 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.463
#> Degrees of Freedom 24
#> SRMR 0.011
#> RMSEA 0.000
#>
#> R-squared (indicators):
#> x1 0.868
#> x2 0.809
#> x3 0.820
#> z1 0.875
#> z2 0.812
#> z3 0.831
#> y1 0.943
#> y2 0.906
#> y3 0.926
#>
#> R-squared (latents):
#> Y 0.561
#>
#> Latent Variables:
#> Estimate Std.Error z.value P(>|z|)
#> X =~
#> x1 0.932 0.006 158.288 0.000
#> x2 0.899 0.008 114.529 0.000
#> x3 0.906 0.007 124.261 0.000
#> Z =~
#> z1 0.935 0.005 173.518 0.000
#> z2 0.901 0.008 107.358 0.000
#> z3 0.912 0.008 116.227 0.000
#> Y =~
#> y1 0.971 0.006 172.539 0.000
#> y2 0.952 0.004 217.341 0.000
#> y3 0.962 0.005 212.068 0.000
#>
#> Regressions:
#> Estimate Std.Error z.value P(>|z|)
#> Y ~
#> X 0.417 0.019 21.753 0.000
#> Z 0.358 0.017 20.853 0.000
#> X:Z 0.446 0.021 21.352 0.000
#>
#> Covariances:
#> Estimate Std.Error z.value P(>|z|)
#> X ~~
#> Z 0.194 0.024 8.211 0.000
#> X:Z -0.012
#> Z ~~
#> X:Z -0.004
#>
#> Thresholds:
#> Estimate Std.Error z.value P(>|z|)
#> x1|t1 -2.174 0.077 -28.235 0.000
#> x1|t2 -0.828 0.031 -26.387 0.000
#> x1|t3 0.078 0.029 2.718 0.007
#> x1|t4 0.892 0.035 25.737 0.000
#> x1|t5 1.875 0.059 32.051 0.000
#> x2|t1 -2.555 0.071 -36.109 0.000
#> x2|t2 -1.575 0.044 -35.627 0.000
#> x2|t3 -0.422 0.038 -11.159 0.000
#> x2|t4 0.405 0.028 14.312 0.000
#> x2|t5 1.299 0.044 29.577 0.000
#> x2|t6 2.518 0.060 41.793 0.000
#> x3|t1 -2.390 0.051 -46.758 0.000
#> x3|t2 -1.245 0.034 -37.119 0.000
#> x3|t3 -0.075 0.029 -2.583 0.010
#> x3|t4 0.742 0.030 24.949 0.000
#> x3|t5 2.085 0.066 31.645 0.000
#> x3|t6 2.689 0.066 41.037 0.000
#> y1|t1 -2.695 0.083 -32.582 0.000
#> y1|t2 -1.504 0.061 -24.538 0.000
#> y1|t3 -0.686 0.033 -20.934 0.000
#> y1|t4 0.501 0.045 11.185 0.000
#> y1|t5 1.611 0.063 25.420 0.000
#> y1|t6 2.587 0.157 16.520 0.000
#> y2|t1 -2.854 0.067 -42.452 0.000
#> y2|t2 -1.655 0.049 -33.992 0.000
#> y2|t3 -1.005 0.037 -27.014 0.000
#> y2|t4 0.292 0.028 10.240 0.000
#> y2|t5 1.074 0.047 22.799 0.000
#> y2|t6 2.344 0.120 19.574 0.000
#> y3|t1 -1.657 0.054 -30.822 0.000
#> y3|t2 -0.855 0.029 -29.641 0.000
#> y3|t3 0.315 0.033 9.434 0.000
#> y3|t4 1.348 0.052 25.790 0.000
#> y3|t5 2.248 0.100 22.578 0.000
#> z1|t1 -2.018 0.065 -31.097 0.000
#> z1|t2 -0.787 0.035 -22.803 0.000
#> z1|t3 0.288 0.034 8.400 0.000
#> z1|t4 0.944 0.034 27.756 0.000
#> z1|t5 2.258 0.130 17.333 0.000
#> z1|t6 3.209 0.067 48.243 0.000
#> z2|t1 -2.846 0.063 -45.367 0.000
#> z2|t2 -1.603 0.035 -45.851 0.000
#> z2|t3 -0.750 0.034 -21.834 0.000
#> z2|t4 0.237 0.035 6.858 0.000
#> z2|t5 1.225 0.040 30.985 0.000
#> z2|t6 2.323 0.165 14.113 0.000
#> z3|t1 -3.321 0.040 -83.375 0.000
#> z3|t2 -1.957 0.048 -40.563 0.000
#> z3|t3 -1.283 0.037 -34.483 0.000
#> z3|t4 -0.204 0.034 -6.045 0.000
#> z3|t5 0.997 0.032 30.921 0.000
#> z3|t6 1.681 0.051 33.255 0.000
#>
#> Variances:
#> Estimate Std.Error z.value P(>|z|)
#> X 1.000
#> Z 1.000
#> .Y 0.439 0.031 14.012 0.000
#> X:Z 1.032
#> .x1 0.132 0.011 12.011 0.000
#> .x2 0.191 0.014 13.543 0.000
#> .x3 0.180 0.013 13.642 0.000
#> .z1 0.125 0.010 12.429 0.000
#> .z2 0.188 0.015 12.461 0.000
#> .z3 0.169 0.014 11.824 0.000
#> .y1 0.057 0.011 5.192 0.000
#> .y2 0.094 0.008 11.291 0.000
#> .y3 0.074 0.009 8.522 0.000