Package: semanticfa 0.2.0

semanticfa: Semantic Factor Analysis of Language Model Embeddings

Performs exploratory factor analysis on language model embeddings of psychological scale items. Embeds item text with sentence transformers or other language models, transforms the embeddings into item-by-item similarity matrices, and extracts latent factor structure via standard exploratory factor analysis. Supports embedding-adapted parallel analysis, several similarity transforms (atomic reversed, SQuID centering, mean-centered Pearson), and fit diagnostics tailored to embedding matrices (TEFI, RMSR, CAF, McDonald's omega). The underlying methods are documented with full citations in the corresponding function help pages. Returns objects compatible with 'psych' and 'EFAtools' workflows.

Authors:Devon Yanitski [aut, cre], Chris Westbury [aut]

semanticfa_0.2.0.tar.gz
semanticfa_0.2.0.zip(r-4.7-any)semanticfa_0.2.0.zip(r-4.6-any)semanticfa_0.2.0.zip(r-4.5-any)
semanticfa_0.2.0.tgz(r-4.6-any)semanticfa_0.2.0.tgz(r-4.5-any)
semanticfa_0.2.0.tar.gz(r-4.7-any)semanticfa_0.2.0.tar.gz(r-4.6-any)
semanticfa_0.2.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
semanticfa/json (API)

# Install 'semanticfa' in R:
install.packages('semanticfa', repos = c('https://devon7y.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/devon7y/semanticfa/issues

Datasets:
  • big5 - IPIP Big Five 50-Item Inventory with Qwen3 Embeddings

On CRAN:

Conda:

4.78 score 1 stars 8 scripts 323 downloads 27 exports 28 dependencies

Last updated from:13ce18a50d. Checks:7 ERROR, 2 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develERROR192
source / vignettesOK525
linux-releaseERROR204
macos-releaseERROR145
macos-oldrelERROR201
windows-develERROR143
windows-releaseERROR150
windows-oldrelERROR154
wasm-releaseOK138

Exports:as_psychsfasfa_anchorsfa_cdsfa_clear_cachesfa_congruencesfa_corplotsfa_dimselectsfa_ekcsfa_embedsfa_install_pythonsfa_item_fitsfa_itemplotsfa_jinglejanglesfa_load_npzsfa_mapsfa_namesfa_naming_instructionsfa_nfactorssfa_nli_matrixsfa_parallelsfa_poolsfa_projectsfa_redundancysfa_similaritysfa_simplifysfa_tsneplot

Dependencies:BHdigestdqrngFNNGPArotationhereirlbajsonlitelatticeMatrixmnormtnlmepngpsychrappdirsRcppRcppAnnoyRcppEigenRcppProgressRcppTOMLreticulaterlangrprojrootRSpectraRtsnesitmouwotwithr

Naming the factors
Basic use | What you get | Using a larger model for naming | Reproducibility notes

Last update: 2026-07-04
Started: 2026-07-04

Getting Started with semanticfa
Overview | Quick start with bundled data | Factor retention | Encoding methods | Visualization | Comparing with empirical factor analysis | Using your own embeddings

Last update: 2026-07-04
Started: 2026-06-03

Readme and manuals

Help Manual

Help pageTopics
semanticfa: Semantic Factor Analysis of Language Model Embeddingssemanticfa-package semanticfa
Coerce to psych fa Objectas_psych as_psych.sfa
IPIP Big Five 50-Item Inventory with Qwen3 Embeddingsbig5
Semantic Factor Analysissfa
Construct-Label and Centroid Anchoringsfa_anchor
Comparison-Data Misfit Profilesfa_cd
Clear Embedding Cachesfa_clear_cache
Compare Semantic and Empirical Factor Structuressfa_congruence
Heatmap of an Item-by-Item Similarity Matrixsfa_corplot
Embedding-Dimension Selection by EGA Depth Optimizationsfa_dimselect
Empirical Kaiser Criterion for Embedding Similarity Matricessfa_ekc
Embed Item Text with a Language Modelsfa_embed
Provision the Python Environment for Embeddingsfa_install_python
Vet a Candidate Scale Item Before Data Collectionsfa_item_fit
2-D Item Map (t-SNE, UMAP, PCA, or MDS)sfa_itemplot sfa_tsneplot
Detect Jingle and Jangle Fallacies Across Scalessfa_jinglejangle
Load Pre-generated Embeddings from a NumPy .npz Filesfa_load_npz
Velicer's Minimum Average Partial for Similarity Matricessfa_map
Name the Factors of an sfa Fitsfa_name
The Default Naming Instructionsfa_naming_instruction
Unified Factor Retention Diagnosticssfa_nfactors
Signed Item Similarity from Natural Language Inferencesfa_nli_matrix
Embedding-Adapted Parallel Analysissfa_parallel
Fetch or Build the Candidate Pool for a Naming Modelsfa_pool
Semantic Projection onto Bipolar Axessfa_project
Detect Redundant (Near-Duplicate) Itemssfa_redundancy
Compute Embedding Similarity Matrixsfa_similarity
Response-Free Scale Simplificationsfa_simplify