Packages
Find and install SEMinR for R, Python, and JavaScript/TypeScript.
SEMinR is R-first: the R package is the authoritative implementation, and the Python and JavaScript/TypeScript ports maintain numerical parity with it. It comes in three variants — pick the one that fits your workflow:
R — the authoritative package (on CRAN)
Python — a port on PyPI (experimental)
JavaScript / TypeScript — a port on npm (experimental)
Each port is validated against R-generated fixtures on the bundled mobi / ECSI dataset, and its public API mirrors SEMinR’s familiar names.
Please note: The Python and JavaScript/TypeScript ports are experimental for now. The R package remains the authoritative implementation; if you run into a problem with a port, please report it on that port’s repository.
Select a tab below for installation instructions:
The authoritative reference implementation. Estimates PLS-SEM (including PLSc), covariance-based SEM, and CFA, with bootstrapping, PLSpredict, PLS-MGA, interactions, and higher-order constructs.
Install the released version from CRAN:
install.packages("seminr")Or install the development version from GitHub:
# install.packages("remotes")
remotes::install_github("sem-in-r/seminr")Then load it:
library(seminr)A Python port with numerical parity to the R package (1e-5 for PLS quantities; tiered tolerances for CBSEM). Requires Python 3.11+; runtime dependencies are NumPy and SciPy only.
Experimental. This port is still maturing — please report any issues on its GitHub repository.
Install from PyPI:
pip install seminrOptional pandas support (DataFrame input and .to_dataframe()):
pip install "seminr[pandas]"A zero-dependency, runtime-agnostic (Bun, Node, Deno, browser) port for running SEM analyses in a modern scripting runtime or embedding estimation in a product. It installs and runs as plain JavaScript, and — being written in TypeScript — ships first-class type declarations for TypeScript projects.
Experimental.
seminr-tsis in early development (0.x) — please report any issues on its GitHub repository.
Install from npm:
npm install @seminr/coreCredits
The R logo is © 2016 The R Foundation, used under CC BY-SA 4.0. “Python” and the Python logos are trademarks of the Python Software Foundation; “TypeScript” and its logo are trademarks of Microsoft. These marks are used here only to indicate language support.