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 62 iterations
#>   Estimator                                 MCPLSc-MLM
#>   Link                                          LINEAR
#>                                                       
#>   Number of observations                         10000
#>   Number of iterations                              62
#>   Number of latent variables                         1
#>   Number of observed variables                       9
#> 
#> Fit Measures:
#>   Chi-Square                                    28.964
#>   Degrees of Freedom                                10
#>   SRMR                                           0.003
#>   RMSEA                                          0.014
#> 
#> R-squared (indicators):
#>   y1                                             0.894
#>   y2                                             0.784
#>   y3                                             0.814
#> 
#> R-squared (latents):
#>   f                                              0.123
#> 
#> Latent Variables:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>   f =~          
#>     y1              0.946                             
#>     y2              0.885                             
#>     y3              0.902                             
#> 
#> Regressions:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>   f ~           
#>     x1              0.237                             
#>     x2              0.162                             
#>     x3              0.075                             
#>     w1              0.129                             
#>     w2              0.092                             
#> 
#> Covariances:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>   x1 ~~         
#>     x2              0.107                             
#>     x3              0.004                             
#>     w1              0.000                             
#>     w2             -0.001                             
#>   x2 ~~         
#>     x3              0.096                             
#>     w1             -0.001                             
#>     w2              0.002                             
#>   x3 ~~         
#>     w1              0.000                             
#>     w2              0.000                             
#>   w1 ~~         
#>     w2             -0.041                             
#> 
#> 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.106                             
#>    .y2              0.216                             
#>    .y3              0.186                             
#>     f~1             0.614                             
#>