A simulated dataset.
# \donttest{
syntax <- '
f =~ y1 + y2 + y3
f ~ rv(s1)*x1 + rv(s2)*x2 + x3
'
fit <- pls(syntax, data = randomSlopes, cluster = "cluster")
summary(fit)
#> plssem (0.2.0) ended normally after 2 iterations
#> Estimator PLS
#> Link LINEAR
#>
#> Number of observations 3000
#> Number of iterations 2
#> Number of latent variables 1
#> Number of observed variables 6
#>
#> Fit Measures:
#> Chi-Square 543.708
#> Degrees of Freedom 6
#> SRMR 0.055
#> RMSEA 0.173
#>
#> R-squared [indicators]:
#> y1 0.755
#> y2 0.614
#> y3 0.756
#>
#> R-squared [latents]:
#> f 0.194
#>
#> Latent Variables:
#> Estimate Std.Error z.value P(>|z|)
#> f =~
#> y1 0.869
#> y2 0.784
#> y3 0.870
#>
#> Regressions:
#> Estimate Std.Error z.value P(>|z|)
#> f ~
#> x1 0.311
#> x2 0.273
#> x3 0.094
#>
#> Covariances:
#> Estimate Std.Error z.value P(>|z|)
#> x1 ~~
#> x2 -0.022
#> x3 0.011
#> x2 ~~
#> x3 0.011
#>
#> Variances:
#> Estimate Std.Error z.value P(>|z|)
#> .f 0.806
#> x1 1.000
#> x2 1.000
#> x3 1.000
#> .y1 0.245
#> .y2 0.386
#> .y3 0.244
#>
# }