A simulated dataset.

Examples


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.3) ended normally after 54 iterations
#>   Estimator                                 MCPLSc-MLM
#>   Link                                          LINEAR
#>                                                       
#>   Number of observations                         10000
#>   Number of iterations                              54
#>   Number of latent variables                         1
#>   Number of observed variables                       9
#> 
#> Fit Measures:
#>   Chi-Square                                    26.230
#>   Degrees of Freedom                                10
#>   SRMR                                           0.003
#>   RMSEA                                          0.013
#> 
#> R-squared (indicators):
#>   y1                                             0.892
#>   y2                                             0.784
#>   y3                                             0.815
#> 
#> R-squared (latents):
#>   f                                              0.123
#> 
#> Latent Variables:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>   f =~          
#>     y1              0.945                             
#>     y2              0.885                             
#>     y3              0.903                             
#> 
#> Regressions:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>   f ~           
#>     x1              0.238                             
#>     x2              0.162                             
#>     x3              0.077                             
#>     w1              0.128                             
#>     w2              0.091                             
#> 
#> Covariances:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>   x1 ~~         
#>     x2              0.104                             
#>     x3              0.004                             
#>     w1              0.003                             
#>     w2              0.001                             
#>   x2 ~~         
#>     x3              0.099                             
#>     w1              0.005                             
#>     w2              0.000                             
#>   x3 ~~         
#>     w1             -0.003                             
#>     w2             -0.001                             
#>   w1 ~~         
#>     w2             -0.042                             
#> 
#> Variances:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>    .f               0.877                             
#>     x1              1.000                             
#>     x2              1.000                             
#>     x3              1.000                             
#>     w1              1.000                             
#>     w2              1.000                             
#>    .y1              0.108                             
#>    .y2              0.216                             
#>    .y3              0.185                             
#>     f~1             0.610                             
#>