Shiny Application for Latent Structure Analysis with a Graphical User Interface
Overview
Provides an interactive Shiny-based toolkit for conducting latent structure analyses, including Latent Profile Analysis (LPA), Latent Class Analysis (LCA), Latent Trait Analysis (LTA/IRT), Exploratory Factor Analysis (EFA), Confirmatory Factor Analysis (CFA), and Structural Equation Modeling (SEM). The implementation is grounded in established methodological frameworks: LPA is supported through 'tidyLPA' (Rosenberg et al., 2018) doi:10.21105/joss.00978, LCA through 'poLCA' (Linzer & Lewis, 2011) doi:10.32614/CRAN.package.poLCA & 'glca' (Kim & Kim, 2024) doi:10.32614/CRAN.package.glca, LTA/IRT via 'mirt' (Chalmers, 2012) doi:10.18637/jss.v048.i06, and EFA via 'psych' (Revelle, 2025). SEM and CFA functionalities build upon the 'lavaan' framework (Rosseel, 2012) doi:10.18637/jss.v048.i02. The CFA/SEM module additionally supports multi-group invariance testing, latent growth modelling, modification indices, and path diagram visualisation. Every module can save and restore an analysis session, export an 'R Markdown' HTML report, and consult an optional AI assistant that interprets the current results through a user-supplied large language model API key. Users can upload datasets or use built-in examples, fit models, compare fit indices, visualize results, and export outputs without programming.
CFA/SEM Module (major update)
- Added an **Advanced Analysis** tab supporting **Multi-group CFA (MGCFA)** with configural, metric (weak), scalar (strong), and strict invariance levels, plus a one-click **Auto Invariance Test** that fits and compares all levels.
- Added **Latent Growth Modelling (LGM)** via
lavaan::growth(). - Added built-in example datasets for the new modes:
PoliticalDemocracy(SEM) andDemo.growth(LGM). - Added a **Data Summary** panel with descriptive tables, data-type composition, and a missingness/correlation heatmap.
- Added **Calculate Variable**: build composite (mean/sum) scores from a simple
NewVar = var1, var2, ...syntax, both for the analysis data and for new data. - Added **Score New Data**: download an Excel template, upload new cases, and compute factor scores from the fitted model.
Show all changes in 0.1.1Hide the rest of the changes in 0.1.1
- Added a **Methodological Guide** with the reporting conventions used by the module.
- Added editable model-comparison table, Heywood-case status flags, and an option to use robust/scaled fit indices.
- Reworked the parameter output into a single tab covering factor loadings, regression paths, variances, and covariances.
- Path diagram gains a **Display Scope** option (full model vs. structural model only).
Save & Restore Analysis Sessions
- Every module (CFA, EFA, LTA, LPA, LCA) can now **save the whole analysis session** to an
.rdsworkspace file and restore it later by uploading that file as the data source. The workspace stores the data, the fitted model objects, and the relevant input settings.
HTML Reports for Every Module
- CFA/SEM, EFA, LTA/IRT, LPA, and LCA each gain a **Report Preview** tab: render the report in-app first, then download the finished HTML.
- Reports embed the R console output and, when requested, the AI interpretive summary.
AI Assistant (new)
- Added a floating **AI Assistant** widget available in every module, with three tabs: *Ask AI* (conversational Q&A about the current results), *Create Summary* (manuscript, APA 7, paragraph, bullet, or table format, in English or Indonesian), and *Settings*.
- Supports Google Gemini, OpenAI, Groq, and OpenRouter. The API key is supplied by the user at runtime, is never stored by the package, and no request is made unless the user provides one.
- The assistant is grounded with reporting rules of thumb for mixture models (Nylund et al., 2007; Masyn, 2013), IRT, and CFA/SEM (Hu & Bentler, 1999; Hair et al., 2017; DiStefano & Morgan, 2014).
- Optional research context can be typed in or uploaded (txt/pdf/docx) to tailor the interpretation, and the generated summary can be pushed into the HTML report.
- The widget can be docked as a tab inside the active module or floated, and the chat transcript can be exported as HTML.
LTA/IRT Module
- Added an **Information & Reliability** tab (test information, marginal reliability, conditional standard error of measurement).
- Added a **DIF Analysis** tab with group and anchor-item selection.
- Added **Score New Data** with an Excel template download.
EFA Module
- Added data summary visualisations, composite-variable calculation, and scoring of new data.
Other
- Added a floating **R Console** widget showing the raw R output behind the results.
- Report previews are now written to a per-session directory and served under a per-session resource prefix, removed when the session ends. Previously every module wrote to a fixed path inside
tempdir()and published the whole oftempdir()over HTTP; becausetempdir()is shared by all sessions served by one R process, concurrent users of a hosted deployment could overwrite and read each other's reports. - New runtime dependencies:
httr,jsonlite,shinycssloaders,writexl.semToolsandpdftoolsare optional (Suggests).
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-23
- NOTE11 OK, 2 NOTE2026-06-09
- ERROR10 OK, 2 NOTE, 1 ERROR2026-06-08
- NOTE10 OK, 2 NOTE2026-04-25
- ERROR11 OK, 2 NOTE, 1 ERROR2026-03-10
Documentation
- Help pages
- 2 (1 internal)includes a package overview page
- Examples that run
- 100%1 run in a plain check (under a condition)
- Exported functions with examples
- 100%
- Documented parameters
- not tracked
- Return-value docs
- 100%
- Help pages citing references
- 0%
Downloads
Repository
Stars over time
Forks over time
Commits over time
6 development-tooling and community-health practices detected across 3 families in the upstream repository
Checks run against github.com/hdmeasure/projectlsa on 2026-10-11.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
Dependencies
Installing projectLSA adds 216 packages (110 with compiled code, 179 MB of source tarballs). Heaviest: stringi 11 MB, tidySEM 9.5 MB, MplusAutomation 7.5 MB.
CRAN will archive these unless their check problems are fixed by the date shown. This package needs each one to install.
- flextablefix by Oct 22
Code & Tests
People & History
Package metadata
- First published
- 2025-12-10
- Total releases
- 7 / 1 yrs
- License
- MIT + file LICENSE OSI
- Minimum R
- ≥ 4.0.0
- Download size
- 248 KB
Cite
Cite this package
Run in R for the authors' entry:
citation("projectLSA")The package provides a citation file, so citation() returns the authors' own entry.
It points to 10.1177/01466216261446305, 10.32614/cran.package.projectlsa.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-18, which the citation names so these numbers can be found later. More on citing and the projects behind them.