openpls-engine
openpls-engine is the Python compute library that powers OpenPLS. It computes Partial Least Squares Structural Equation Models (PLS-SEM): inner and outer models, path coefficients, quality criteria, bootstrap confidence intervals, multi-group analysis, and the modern advanced techniques (IPMA, PLSpredict, moderation, FIMIX-PLS) that commercial PLS-SEM software exposes.
The library is a maintained fork of plspm-python by Jez Humble (Google). The original PLS path algorithm is preserved intact; everything around it (metrics, advanced analyses, two new inner-weighting schemes) is OpenPLS’s own work, released under GPL-3.0 to keep the methodology auditable for reviewers and dissertation committees.
It is intended for:
- researchers running PLS-SEM analyses from Python or Jupyter notebooks,
- teams who want a reproducible, version-pinned engine behind their own tooling,
- developers integrating PLS-SEM into a larger application (the OpenPLS web app itself uses this library on the server).
What you get
- Five inner-weighting schemes, including two new alternatives to the classical trio: Lohmöller’s PCA (first-principal-direction) and a quasi-Newton BFGS scheme. The familiar Centroid, Factorial, and Path schemes remain.
- Modern quality criteria: HTMT (and HTMT2 geometric-mean refinement, Roemer et al. 2021), SRMR, d_ULS, Cronbach alpha, Dijkstra-Henseler rho, adjusted R squared, BIC for endogenous LVs, Stone-Geisser Q squared via blindfolding.
- Outer-model diagnostics: per-indicator and per-predictor VIF for collinearity, and CTA-PLS (confirmatory tetrad analysis) for testing whether reflective (Mode A) specification is supported by the data.
- Advanced analyses out of the box: PLSc (consistent PLS, Dijkstra and Henseler 2015) for measurement-error attenuation correction in reflective models, Gaussian-copula endogeneity test (Park and Gupta 2012; Hult et al. 2018) for structural-equation predictors, disjoint two-stage higher-order constructs (Sarstedt et al. 2019; Hair et al. 2022) covering all four canonical HOC types (R-R, R-F, F-R, F-F), IPMA (importance-performance map), PLSpredict (k-fold out-of-sample validation), two-stage moderation, FIMIX-PLS finite-mixture segmentation.
- Multi-group analysis with Henseler permutation tests, two-sided p-values with Phipson-Smyth smoothing, categorical and numeric-range group specs.
- MICOM (Measurement Invariance of Composite Models, Henseler, Ringle and Sarstedt 2016): three-step pre-MGA check with per-construct compositional-invariance correlation
cand permutation tests on means and variances. Per-construct verdict ("full"/"partial"/"none") tells you whether the composites are comparable before you interpret group differences. - Long-running bootstrap with progress callbacks, sign-flipping, BCa percentile CIs, and a configurable success-rate floor, suited for Cloud Run or any worker-style execution.
- Missing-value handling with either casewise deletion (the upstream default) or mean replacement (matches the option in commercial PLS-SEM tools).
Recent additions
The 1.x series has shipped several seminr-aligned diagnostics and a modern higher-order workflow:
- 1.5.0 — MICOM (Measurement Invariance of Composite Models, Henseler, Ringle and Sarstedt 2016) via
Plspm.micom(...). Three-step verdict (configural → compositional → mean / variance equality) that tells you whether two groups’ composites are comparable before MGA. Closes the longstanding gap where the engine shipped MGA but no in-engine invariance check to back it up. - 1.4.0 — five reviewer-standard additions:
- Publication-ready summary report via
Plspm.report(). Bundles reliability (alpha / rho_A / rho_C / AVE), discriminant validity (HTMT, HTMT2, Fornell-Larcker), structural paths with f² effect sizes, per-LV R² / adjusted R² / BIC, fit indices (SRMR, d_ULS, GoF), and outer/inner VIF into one object — exactly the panels expected by Hair, Hult, Ringle and Sarstedt (2022, A Primer on PLS-SEM, 3rd ed.).Report.to_dict()bundles every section for export. - PLSpredict full panel via
Plspm.predict(...).metrics(). Adds per-indicator MAPE for PLS and LM plus in-sample counterparts of RMSE / MAE / MAPE on top of the existing out-of-sample k-fold panel. This is the complete Shmueli et al. (2019, Table 6) report. - Cohen’s f² effect size via
Plspm.f_squared(). Refits the OLS for each endogenous LV without each predictor and reportsf² = (R²_full - R²_reduced) / (1 - R²_full)with the small / medium / large effect-size labels (Cohen 1988; Hair et al. 2022). - Fornell-Larcker discriminant-validity criterion via
Plspm.fornell_larcker(). Square matrix withsqrt(AVE)on the diagonal and inter-construct correlations off-diagonal, plus a per-LVpassesverdict (Fornell and Larcker 1981). - Specific indirect effects for mediation analysis via
Plspm.specific_indirect_effects(...)andBootstrap.specific_indirect_effects(...). Auto-enumerates every chainsource -> M1 -> ... -> targetin the structural DAG (or evaluates an explicit chain), returns point estimates and bootstrap percentile CIs. Aligns the engine withseminr::specific_effect_significance().
- Publication-ready summary report via
- 1.3.0 — disjoint two-stage higher-order constructs (HOC) via
Plspm.higher_order(...). Covers all four canonical types (Type I R-R, II R-F, III F-R, IV F-F), supports chained / nested HOCs, and keeps the legacyConfig.add_higher_order(repeated-indicators) untouched for backward compatibility. - 1.2.0 — three additive diagnostics in one release:
- PLSc via
Plspm.plsc(). Consistent-PLS (Dijkstra and Henseler 2015) bias correction for reflective Mode A measurement: per-LVrho_A, dis-attenuated construct correlations, corrected paths / R² / loadings. - HTMT2 via
Plspm.htmt2(). Geometric-mean refinement of HTMT (Roemer, Schuberth and Henseler 2021); samematrix()/pairs()API asHTMT. - Gaussian-copula endogeneity test via
Plspm.copula(...). Park and Gupta (2012) / Hult et al. (2018) test for endogenous structural predictors, with a Cramér-von Mises admissibility check.
- PLSc via
- 1.1.0 — VIF (
items()+inner()) and CTA-PLS (Plspm.cta(...)) for outer-model diagnostics.
See the Changelog for the full history and the API reference for the per-class documentation.
Install
pip install openpls-engineSee the Installation page for source installs and version pinning.
Next steps
- Read the Quickstart to fit your first model end to end.
- Skim Core concepts if PLS-SEM, Mode A/B, or the inner-weighting schemes are unfamiliar.
- Browse the API reference for the full surface area.
Project links
- GitHub: github.com/jojacobsen/openpls-engine
- PyPI: pypi.org/project/openpls-engine
- Hosted OpenPLS web app: openpls.app