← ClaudeAtlas

topic-modelinglisted

Specifies and diagnoses structural topic models for survey and experimental text — choosing among STM, LDA, and BERTopic, preprocessing decisions and their consequences, prevalence and content formulas with spectral initialization and a recorded seed, selecting the topic count across semantic coherence, exclusivity and FREX, held-out likelihood, and residuals rather than one metric, interpretation and validation against representative documents, robustness checks, and DA-RT-compliant reporting. Use when the user has open-ended responses or another corpus and asks what topics are in it, asks how many topics to use, asks about STM, searchK, coherence, or FREX, or wants topic prevalence compared across treatment arms or countries. Coding against a fixed codebook goes to text-classification.
scdenney/open-science-skills · ★ 57 · AI & Automation · score 74
Install: claude install-skill scdenney/open-science-skills
# Topic Modeling for Survey and Experimental Text Data ## Instructions ### 1. Model Selection - Default to Structural Topic Models (STM) when analyzing text from surveys or experiments. STM incorporates document-level metadata — treatment conditions, respondent demographics, country — directly into estimation, allowing prevalence and content to vary with covariates (Roberts et al. 2014). - Use standard LDA only when no document-level covariates are needed and the corpus is large enough for unsupervised discovery (Blei, Ng & Jordan 2003). - Consider BERTopic when working with short texts where word co-occurrence is sparse, or when multilingual embedding-based similarity is required (Grootendorst 2022). BERTopic clusters document embeddings via HDBSCAN, which yields hard single-topic-per-document assignments (unlike STM/LDA mixed membership), c-TF-IDF topic words that can be unstable on small corpora, and no native covariate framework. Use it when embedding-based semantic similarity matters more than mixed-membership structure or covariate estimation. - Recognize the distinction between topic categorization and attitude inference: topic models reveal what respondents *discussed*, not what they *believe*. If the goal is inferring latent attitudes rather than categorizing surface content, complement topic modeling with an embeddings-based scaling of contextually common words or a separate supervised classifier (Hobbs & Green 2025; see also the companion `text-classification` s