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.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 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.013 74.030 0.000
#> x2 0.905 0.014 63.777 0.000
#> x3 0.899 0.014 66.129 0.000
#> Z =~
#> z1 0.911 0.015 59.585 0.000
#> z2 0.909 0.019 49.061 0.000
#> z3 0.918 0.016 55.761 0.000
#> Y =~
#> y1 0.966 0.006 155.072 0.000
#> y2 0.959 0.007 144.338 0.000
#> y3 0.961 0.006 161.885 0.000
#>
#> Regressions:
#> Estimate Std.Error z.value P(>|z|)
#> Y ~
#> X 0.423 0.015 28.840 0.000
#> Z 0.361 0.015 24.305 0.000
#> X:Z 0.452 0.019 24.072 0.000
#>
#> Covariances:
#> Estimate Std.Error z.value P(>|z|)
#> X ~~
#> Z 0.201 0.025 8.006 0.000
#> X:Z 0.018 0.038 0.474 0.635
#> Z ~~
#> X:Z 0.060 0.046 1.304 0.192
#>
#> Variances:
#> Estimate Std.Error z.value P(>|z|)
#> X 1.000 0.026 37.965 0.000
#> Z 1.000 0.023 43.170 0.000
#> .Y 0.396 0.015 26.775 0.000
#> X:Z 1.013 0.069 14.632 0.000
#> .x1 0.137 0.023 5.892 0.000
#> .x2 0.181 0.026 7.023 0.000
#> .x3 0.191 0.024 7.815 0.000
#> .z1 0.170 0.028 6.131 0.000
#> .z2 0.173 0.034 5.138 0.000
#> .z3 0.157 0.030 5.211 0.000
#> .y1 0.066 0.012 5.496 0.000
#> .y2 0.081 0.013 6.371 0.000
#> .y3 0.077 0.011 6.799 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.2) 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.754
#> Degrees of Freedom 24
#> SRMR 0.012
#> RMSEA 0.000
#>
#> R-squared (indicators):
#> x1 0.931
#> x2 0.900
#> x3 0.906
#> z1 0.935
#> z2 0.901
#> z3 0.913
#> y1 0.972
#> y2 0.952
#> y3 0.962
#>
#> R-squared (latents):
#> Y 0.571
#>
#> Latent Variables:
#> Estimate Std.Error z.value P(>|z|)
#> X =~
#> x1 0.931 0.007 141.112 0.000
#> x2 0.900 0.008 119.014 0.000
#> x3 0.906 0.007 123.232 0.000
#> Z =~
#> z1 0.935 0.006 149.821 0.000
#> z2 0.901 0.009 102.342 0.000
#> z3 0.913 0.008 110.558 0.000
#> Y =~
#> y1 0.972 0.004 221.923 0.000
#> y2 0.952 0.005 187.673 0.000
#> y3 0.962 0.004 225.935 0.000
#>
#> Regressions:
#> Estimate Std.Error z.value P(>|z|)
#> Y ~
#> X 0.417 0.017 24.082 0.000
#> Z 0.357 0.017 21.191 0.000
#> X:Z 0.446 0.018 25.221 0.000
#>
#> Covariances:
#> Estimate Std.Error z.value P(>|z|)
#> X ~~
#> Z 0.194 0.023 8.254 0.000
#> X:Z 0.005
#> Z ~~
#> X:Z 0.003
#>
#> Variances:
#> Estimate Std.Error z.value P(>|z|)
#> X 1.000
#> Z 1.000
#> .Y 0.429
#> X:Z 1.049
#> .x1 0.069
#> .x2 0.100
#> .x3 0.094
#> .z1 0.065
#> .z2 0.099
#> .z3 0.087
#> .y1 0.028
#> .y2 0.048
#> .y3 0.038