Getting started

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.
  • Research-methodology diagnostics: nomological validity (Cronbach and Meehl 1955; Hair et al. 2022) via directional one-sided t-tests on LV correlations; common-method-bias screening via the Lindell-Whitney (2001) marker-variable procedure; predictive-relevance testing via the paired Cross-Validated Predictive Ability Test (CVPAT, Liengaard et al. 2021) with IA or LM benchmark.
  • Multi-group analysis with Henseler permutation tests, two-sided p-values with Phipson-Smyth smoothing, categorical and numeric-range group specs. For exactly two groups, BootstrapMGA adds the bootstrap-based three-test panel (Henseler 2007 distribution-based + Chin 2000 parametric + Welch-Satterthwaite) on path coefficients, outer loadings / weights, total effects, and specific / total indirect effects.
  • MICOM (Measurement Invariance of Composite Models, Henseler, Ringle and Sarstedt 2016): three-step pre-MGA check with per-construct compositional-invariance correlation c and 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.10.0 - three additive research-methodology diagnostics that reviewers increasingly expect:
    • Nomological validity via Plspm.nomological_validity(hypotheses, alpha=0.05). Directional hypothesis testing on latent-variable correlations (Cronbach and Meehl 1955; Hair et al. 2022): each hypothesis is (source, target, expected_sign), evaluated via a one-sided t-test on the Pearson correlation between LV score columns. Complements the convergent (AVE) and discriminant (HTMT / Fornell-Larcker) validity panels.
    • Common Method Bias (Lindell-Whitney marker-variable procedure) via Plspm.cmb_lindell_whitney(marker, alpha=0.05). Takes a marker variable theoretically unrelated to any substantive construct, estimates the CMV proxy r_M as the signed smallest-absolute marker-LV correlation, and partial-correlates every substantive LV pair to flag pairs that flip significance under adjustment (Lindell and Whitney 2001; Malhotra, Kim and Patil 2006).
    • CVPAT (Cross-Validated Predictive Ability Test) via Plspm.cvpat(benchmark="IA", k=10, ...). Paired one-sided t-test on PLS-vs-benchmark k-fold prediction losses (Liengaard et al. 2021, Decision Sciences 52(2)). Two benchmarks - indicator average ("IA") or linear model ("LM") - plus a per-endogenous-LV breakdown. Formalises the “PLS is better than the benchmark” verdict that PLSpredict lacks.
  • 1.7.0 - PLSc mediation panel: PLSc.effects() returns direct / indirect / total effects walked over the dis-attenuated structural DAG, and PLSc.specific_indirect_effects(source, target, through=None) point-estimates every source -> ... -> target mediation chain by multiplying the corrected β along the chain (Zhao/Lynch/Chen 2010; Nitzl/Roldán/Cepeda 2016). Closes the previous gap where common-factor model interpretation still carried the PLS-SEM attenuation forward into the mediation estimate.
  • 1.6.0 - six bootstrap / invariance / disattenuation refinements:
    • Bootstrap-based Multi-Group Analysis via openpls.bootstrap_mga.BootstrapMGA. Complements the permutation-based MGA with the SmartPLS-style three-test panel (Henseler 2007 distribution-based + Chin 2000 parametric + Welch-Satterthwaite) on path coefficients, outer loadings / weights, total effects, and specific / total indirect effects of exactly two groups.
    • Unified bootstrap inference tables on LongBootstrap via the new inference property: one dict keyed by pathCoefficients / outerLoadings / outerWeights / specificIndirectEffects / totalIndirectEffects / totalEffects, each carrying the canonical original / mean / std_error / t_value / p_value and both percentile and bias-corrected CIs (Efron 1987; Davison and Hinkley 1997).
    • PLSc disattenuated quality panel - closes the gap that previously mixed PLSc paths and loadings with PLS-SEM AVE / ρ_c / SRMR / BIC / HTMT / VIF: new PLSc.ave(), rho_c(), htmt(), srmr(), d_uls(), bic(), vif_inner(). The composite-model Plspm accessors stay unchanged so both interpretations are available side by side.
    • IPMA Henseler convention - IPMA.indicators() now emits indicator_importance (= outer_weight × lv_importance) and henseler_normalized_weight (the value SmartPLS-style IPMA tables report under “Normalized Weight”).
    • MICOM step 3 raw variance difference alongside the canonical log_var_ratio; matches the convention used by SmartPLS-style validation tables.
    • PLSpredict earliest-antecedents LM benchmark via Plspm.predict(..., lm_predictor_set="earliest_antecedents"), walking upstream through every mediator per the Shmueli/Hair/Ringle 2019 convention.
  • 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 reports f² = (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 with sqrt(AVE) on the diagonal and inter-construct correlations off-diagonal, plus a per-LV passes verdict (Fornell and Larcker 1981).
    • Specific indirect effects for mediation analysis via Plspm.specific_indirect_effects(...) and Bootstrap.specific_indirect_effects(...). Auto-enumerates every chain source -> M1 -> ... -> target in the structural DAG (or evaluates an explicit chain), returns point estimates and bootstrap percentile CIs. Aligns the engine with seminr::specific_effect_significance().
  • 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 legacy Config.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-LV rho_A, dis-attenuated construct correlations, corrected paths / R² / loadings.
    • HTMT2 via Plspm.htmt2(). Geometric-mean refinement of HTMT (Roemer, Schuberth and Henseler 2021); same matrix() / pairs() API as HTMT.
    • 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.
  • 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

Terminal window
pip install openpls-engine

See 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.

Cite

If you use openpls-engine in academic work, please cite the validation paper alongside the software:

Structured metadata is in CITATION.cff; GitHub renders a “Cite this repository” button from it.