A simulated dataset.
# \donttest{
syntax <- '
f =~ y1 + y2 + y3
f ~ x1 + x2 + x3 + w1 + w2 + (1 | cluster)
'
fit <- pls(syntax, data = randomIntercepts)
summary(fit)
#> plssem->fitMeasures():
#> Fit measures for MC-PLSc models are under development! Traditional fit
#> criteria will likely be too strict.
#> plssem->fitMeasures():
#> Resampling MC-PLSc Model (R = 1000000)...
#> plssem (0.1.4) ended normally after 53 iterations
#> Estimator MCPLSc-MLM
#> Link LINEAR
#>
#> Number of observations 10000
#> Number of iterations 53
#> Number of latent variables 1
#> Number of observed variables 9
#>
#> Fit Measures:
#> Chi-Square 15.743
#> Degrees of Freedom 10
#> SRMR 0.003
#> RMSEA 0.008
#>
#> R-squared (indicators):
#> y1 0.880
#> y2 0.787
#> y3 0.822
#>
#> R-squared (latents):
#> f 0.122
#>
#> Latent Variables:
#> Estimate Std.Error z.value P(>|z|)
#> f =~
#> y1 0.938
#> y2 0.887
#> y3 0.907
#>
#> Regressions:
#> Estimate Std.Error z.value P(>|z|)
#> f ~
#> x1 0.237
#> x2 0.162
#> x3 0.076
#> w1 0.129
#> w2 0.092
#>
#> Covariances:
#> Estimate Std.Error z.value P(>|z|)
#> x1 ~~
#> x2 0.102
#> x3 0.001
#> w1 -0.002
#> w2 0.001
#> x2 ~~
#> x3 0.094
#> w1 0.000
#> w2 -0.004
#> x3 ~~
#> w1 0.001
#> w2 -0.002
#> w1 ~~
#> w2 -0.040
#>
#> Variances:
#> Estimate Std.Error z.value P(>|z|)
#> .f 0.878
#> x1 1.000
#> x2 1.000
#> x3 1.000
#> w1 1.000
#> w2 1.000
#> .y1 0.120
#> .y2 0.213
#> .y3 0.178
#> f~1 0.622
#>
# }