`pls()` estimates Partial Least Squares Structural Equation Models (PLS-SEM) and their consistent (PLSc) variants. The function accepts `lavaan`-style syntax, handles ordered indicators through polychoric correlations and probit factor scores, and supports multilevel specifications expressed with `lme4`-style random effects terms inside the structural model.

pls(
  syntax,
  data,
  standardize = TRUE,
  consistent = TRUE,
  bootstrap = FALSE,
  sample = 50L,
  ordered = NULL,
  probit = NULL,
  consistent.probit = TRUE,
  tolerance = 1e-05,
  max.iter.0_5 = 100L,
  max.iter.0_9 = 50L,
  ...
)

Arguments

syntax

Character string with `lavaan`-style model syntax describing both measurement (`=~`) and structural (`~`) relations. Random effects are specified with `(term | cluster)` statements.

data

A `data.frame` or coercible object containing the manifest indicators referenced in `syntax`. Ordered factors are automatically detected, but can also be supplied explicitly through `ordered`.

standardize

Logical; if `TRUE`, indicators are standardized before estimation so that factor scores have comparable scales.

consistent

Logical; `TRUE` requests PLSc corrections, whereas `FALSE` fits the traditional PLS model.

bootstrap

Logical; if `TRUE`, nonparametric bootstrap standard errors are computed with `sample` resamples.

sample

Integer giving the number of bootstrap resamples drawn when `bootstrap = TRUE`.

ordered

Optional character vector naming manifest indicators that should be treated as ordered when computing polychoric correlations.

probit

Logical; overrides the automatic choice of probit factor scores that is based on whether ordered indicators are present.

consistent.probit

Logical; Should probit consistent estimates be calculated?

tolerance

Numeric; Convergence criteria/tolerance.

max.iter.0_5

Maximum number of PLS iterations performed when estimating the measurement and structural models.

max.iter.0_9

Maximum number of PLS iterations performed when estimating the measurement and structural models. Only relevant for interaction models with ordered data.

...

Currently unused, reserved for future extensions.

max.iter

Maximum number of PLS iterations performed when estimating the measurement and structural models.

Value

An object of class `plssem` containing the estimated parameters, fit measures, factor scores, and any bootstrap results. Methods such as `summary()`, `print()`, and `coef()` can be applied to inspect the fit.

See also

[summary.plssem()], [print.plssem()]

Examples

tpb <- '
# Outer Model (Based on Hagger et al., 2007)
  ATT =~ att1 + att2 + att3 + att4 + att5
  SN =~ sn1 + sn2
  PBC =~ pbc1 + pbc2 + pbc3
  INT =~ int1 + int2 + int3
  BEH =~ b1 + b2

# Inner Model (Based on Steinmetz et al., 2011)
  INT ~ ATT + SN + PBC
  BEH ~ INT + PBC
'

fit <- pls(tpb, data = modsem::TPB)
summary(fit)
#> plssem (0.1.0) ended normally after 3 iterations
#> 
#>   Estimator                                       PLSc
#>   Link                                          LINEAR
#>                                                       
#>   Number of observations                          2000
#>   Number of iterations                               3
#>   Number of latent variables                         5
#>   Number of observed variables                      15
#> 
#> R-squared (indicators):
#>   att1                                           0.847
#>   att2                                           0.825
#>   att3                                           0.805
#>   att4                                           0.745
#>   att5                                           0.845
#>   sn1                                            0.817
#>   sn2                                            0.863
#>   pbc1                                           0.856
#>   pbc2                                           0.859
#>   pbc3                                           0.787
#>   int1                                           0.816
#>   int2                                           0.827
#>   int3                                           0.742
#>   b1                                             0.762
#>   b2                                             0.821
#> 
#> R-squared (latents):
#>   INT                                            0.367
#>   BEH                                            0.210
#> 
#> Latent Variables:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>   ATT =~        
#>     att1            0.921                             
#>     att2            0.908                             
#>     att3            0.897                             
#>     att4            0.863                             
#>     att5            0.919                             
#>   SN =~         
#>     sn1             0.904                             
#>     sn2             0.929                             
#>   PBC =~        
#>     pbc1            0.925                             
#>     pbc2            0.927                             
#>     pbc3            0.887                             
#>   INT =~        
#>     int1            0.903                             
#>     int2            0.909                             
#>     int3            0.861                             
#>   BEH =~        
#>     b1              0.873                             
#>     b2              0.906                             
#> 
#> Regressions:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>   INT ~         
#>     ATT             0.243                             
#>     SN              0.201                             
#>     PBC             0.240                             
#>   BEH ~         
#>     PBC             0.308                             
#>     INT             0.210                             
#> 
#> Covariances:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>   ATT ~~        
#>     SN              0.633                             
#>     PBC             0.692                             
#>   SN ~~         
#>     PBC             0.696                             
#> 
#> Variances:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>     ATT             1.000                             
#>     SN              1.000                             
#>     PBC             1.000                             
#>    .INT             0.633                             
#>    .BEH             0.790                             
#>    .att1            0.153                             
#>    .att2            0.175                             
#>    .att3            0.195                             
#>    .att4            0.255                             
#>    .att5            0.155                             
#>    .sn1             0.183                             
#>    .sn2             0.137                             
#>    .pbc1            0.144                             
#>    .pbc2            0.141                             
#>    .pbc3            0.213                             
#>    .int1            0.184                             
#>    .int2            0.173                             
#>    .int3            0.258                             
#>    .b1              0.238                             
#>    .b2              0.179                             
#> 

syntax <- "
  X =~ x1 + x2 + x3
  Z =~ z1 + z2 + z3
  Y =~ y1 + y2 + y3
  W =~ w1 + w2 + w3
  Y ~ X + Z + (1 + X + Z | cluster)
  W ~ X + Z + (1 + X + Z | cluster)
"

fit <- pls(syntax, data = randomSlopesOrdered)
summary(fit)
#> plssem (0.1.0) ended normally after 3 iterations
#> 
#>   Estimator                                OrdPLSc-MLM
#>   Link                                          PROBIT
#>                                                       
#>   Number of observations                          5000
#>   Number of iterations                               3
#>   Number of latent variables                         4
#>   Number of observed variables                      18
#> 
#> R-squared (indicators):
#>   x1                                             0.870
#>   x2                                             0.669
#>   x3                                             0.789
#>   z1                                             0.841
#>   z2                                             0.714
#>   z3                                             0.758
#>   y1                                             0.844
#>   y2                                             0.711
#>   y3                                             0.754
#>   w1                                             0.835
#>   w2                                             0.681
#>   w3                                             0.785
#> 
#> R-squared (latents):
#>   Y                                              0.440
#>   W                                              0.440
#> 
#> Latent Variables:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>   X =~          
#>     x1              0.933                             
#>     x2              0.818                             
#>     x3              0.888                             
#>   Z =~          
#>     z1              0.917                             
#>     z2              0.845                             
#>     z3              0.871                             
#>   Y =~          
#>     y1              0.918                             
#>     y2              0.843                             
#>     y3              0.869                             
#>   W =~          
#>     w1              0.914                             
#>     w2              0.825                             
#>     w3              0.886                             
#> 
#> Regressions:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>   Y ~           
#>     X               0.290                             
#>     Z               0.451                             
#>   W ~           
#>     X               0.391                             
#>     Z               0.245                             
#> 
#> Intercepts:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>    .Y               0.011                             
#>    .W               0.009                             
#> 
#> Covariances:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>   X ~~          
#>     Z               0.168                             
#>   Y~X ~~        
#>     Y~1            -0.006                             
#>   Y~Z ~~        
#>     Y~1            -0.024                             
#>     Y~X             0.012                             
#>   W~X ~~        
#>     W~1             0.004                             
#>   W~Z ~~        
#>     W~1             0.009                             
#>     W~X             0.016                             
#> 
#> Thresholds:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>     x1|t1          -2.848                             
#>     x1|t2          -1.999                             
#>     x1|t3          -0.947                             
#>     x1|t4           0.134                             
#>     x1|t5           1.088                             
#>     x1|t6           2.165                             
#>     x2|t1          -1.940                             
#>     x2|t2          -0.976                             
#>     x2|t3           0.276                             
#>     x2|t4           0.974                             
#>     x2|t5           2.245                             
#>     x2|t6           2.989                             
#>     x3|t1          -2.018                             
#>     x3|t2          -1.143                             
#>     x3|t3          -0.178                             
#>     x3|t4           0.671                             
#>     x3|t5           1.852                             
#>     x3|t6           2.727                             
#>     z1|t1          -2.149                             
#>     z1|t2          -1.324                             
#>     z1|t3          -0.218                             
#>     z1|t4           0.844                             
#>     z1|t5           1.878                             
#>     z1|t6           2.636                             
#>     z2|t1          -2.468                             
#>     z2|t2          -1.433                             
#>     z2|t3          -0.286                             
#>     z2|t4           0.810                             
#>     z2|t5           1.524                             
#>     z2|t6           2.620                             
#>     z3|t1          -2.706                             
#>     z3|t2          -2.084                             
#>     z3|t3          -1.158                             
#>     z3|t4           0.093                             
#>     z3|t5           0.980                             
#>     z3|t6           1.981                             
#>     y1|t1          -2.524                             
#>     y1|t2          -1.758                             
#>     y1|t3          -0.678                             
#>     y1|t4           0.405                             
#>     y1|t5           1.464                             
#>     y1|t6           2.382                             
#>     y2|t1          -2.447                             
#>     y2|t2          -1.691                             
#>     y2|t3          -0.576                             
#>     y2|t4           0.232                             
#>     y2|t5           1.410                             
#>     y2|t6           2.349                             
#>     y3|t1          -1.884                             
#>     y3|t2          -0.960                             
#>     y3|t3          -0.104                             
#>     y3|t4           1.128                             
#>     y3|t5           1.981                             
#>     y3|t6           3.090                             
#>     w1|t1          -2.636                             
#>     w1|t2          -1.679                             
#>     w1|t3          -0.798                             
#>     w1|t4           0.285                             
#>     w1|t5           1.104                             
#>     w1|t6           2.264                             
#>     w2|t1          -2.428                             
#>     w2|t2          -1.649                             
#>     w2|t3          -0.621                             
#>     w2|t4           0.580                             
#>     w2|t5           1.427                             
#>     w2|t6           2.366                             
#>     w3|t1          -2.357                             
#>     w3|t2          -1.433                             
#>     w3|t3          -0.732                             
#>     w3|t4           0.598                             
#>     w3|t5           1.525                             
#>     w3|t6           2.203                             
#> 
#> Variances:
#>                  Estimate  Std.Error  z.value  P(>|z|)
#>     X               1.000                             
#>     Z               1.000                             
#>    .Y               0.560                             
#>    .W               0.560                             
#>    .x1              0.130                             
#>    .x2              0.331                             
#>    .x3              0.211                             
#>    .z1              0.159                             
#>    .z2              0.286                             
#>    .z3              0.242                             
#>    .y1              0.156                             
#>    .y2              0.289                             
#>    .y3              0.246                             
#>    .w1              0.165                             
#>    .w2              0.319                             
#>    .w3              0.215                             
#>     Y~1             0.076                             
#>     Y~X             0.018                             
#>     Y~Z             0.101                             
#>     W~1             0.052                             
#>     W~X             0.099                             
#>     W~Z             0.142                             
#>