`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,
mcpls = NULL,
probit = NULL,
tolerance = 1e-05,
max.iter.0_5 = 100L,
...
)Character string with `lavaan`-style model syntax describing both measurement (`=~`) and structural (`~`) relations. Random effects are specified with `(term | cluster)` statements.
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`.
Logical; if `TRUE`, indicators are standardized before estimation so that factor scores have comparable scales.
Logical; `TRUE` requests PLSc corrections, whereas `FALSE` fits the traditional PLS model.
Logical; if `TRUE`, nonparametric bootstrap standard errors are computed with `sample` resamples.
Integer giving the number of bootstrap resamples drawn when `bootstrap = TRUE`.
Optional character vector naming manifest indicators that should be treated as ordered when computing polychoric correlations.
Should a Monte-Carlo consistency correction be applied?
Logical; overrides the automatic choice of probit factor scores that is based on whether ordered indicators are present.
Numeric; Convergence criteria/tolerance.
Maximum number of PLS iterations performed when estimating the measurement and structural models.
Currently unused, reserved for future extensions.
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.
[summary.plssem()], [print.plssem()]
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.531
#> W 0.544
#>
#> 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
#>
#> Variances:
#> Estimate Std.Error z.value P(>|z|)
#> X 1.000
#> Z 1.000
#> .Y 0.469
#> .W 0.456
#> .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
#>