Reporting and comparing structural models in Mplus often requires manually extracting fit indices, standardized paths, and explained variance from multiple output files. This process is time-consuming, error-prone, and difficult to reproduce.
Mplus2Excel is a lightweight utility that scans a folder of Mplus structural model .out files, automatically:
- Aggregates model fit indices across competing structural models
- Produces clean structural model comparison tables
- Extracts STDYX standardized path coefficients
- Extracts R² values for endogenous variables
- Compiles everything into a single, publication-ready Excel workbook
When run in a folder containing only Mplus structural model output files, the tool will:
- Scan all
.outfiles in the folder - Extract key fit indices (e.g. χ², df, CFI, TLI, RMSEA, SRMR, AIC, BIC)
- Compile all models into a single structural comparison table
- Extract STDYX standardized structural paths
- Extract R² values for all endogenous variables
- Export all results to a single Excel workbook
This eliminates repetitive copy-paste work and substantially reduces reporting errors.
The folder must contain only Mplus structural model
.outfiles.
- Do not include measurement models
- Do not include auxiliary analyses
- Do not mix different projects
All detected .out files are treated as competing structural models and will be included in the same comparison tables.
I built this tool after repeatedly spending hours manually extracting structural paths, fit indices, and R² values for manuscripts, reviewer responses, and technical reports.
✅ Saves substantial time
✅ Eliminates transcription errors
✅ Produces consistent, reproducible tables
✅ Ideal for SEM, path models, and mediation analyses
✅ Designed for researchers who rely heavily on Mplus
- Download
Mplus2Excel_Structural.exefrom GitHub Releases - Place the EXE in the folder containing your Mplus
.outfiles - Double-click the EXE
- An Excel workbook and a
run.logfile will be created in the same folder
If something goes wrong, the log file can be shared for troubleshooting.
pip install -r requirements.txt
python mplus2excel_structural.py
Instructions tab (variable and path labels)
Table 1: Structural model fit indices
Table 2+: STDYX standardized structural paths
R² table: Explained variance for endogenous variables
Audit tab: Parsed values for verification and transparency
By default, the workbook is saved as Structural_Models_Report_APA.xlsx.
If the file is open or locked, the script saves an alternative *_NEW.xlsx file.
This project was created by Prof. Llewellyn E. van Zyl .
- 🌍 Website: www.psynalytics.com
- 🔗 GitHub: @llewellynvz
🔥 If you’d like to contribute, feel free to fork this repo, submit a pull request, or report bugs!
This software is proprietary. Use and local modification are permitted for personal, academic, and internal research purposes only. Redistribution or commercial use is not permitted.
See the LICENSE file for details.
Star the repository ⭐
Share it with colleagues using Mplus
Contribute improvements or edge-case fixes