Structural Topic Model
The structural topic model is a topic model in which each document's topic proportions follow a logistic-normal regression on document covariates, so the effect of covariates on topic prevalence can be estimated with uncertainty.
구조적 주제 모형은 문서의 주제 비율이 문서 공변량의 로지스틱 정규 회귀를 따르도록 한 주제 모형으로, 공변량이 주제 비중에 주는 효과를 불확실성과 함께 추정합니다.
Which topics appear in my documents, and do covariates such as group, time or author characteristics change how much each topic is discussed?
문서에 어떤 주제가 있고, 집단이나 시기 같은 변수에 따라 주제 비중이 달라지는지 알고 싶어요.
The model learns topics as word distributions and lets the expected topic proportions depend on covariates through a logistic-normal prior, fitted by variational EM with a Laplace approximation per document. Covariate effects on each topic's proportion are estimated by repeatedly drawing topic proportions from their approximate posterior and regressing them on the covariates, which carries the topic uncertainty into the confidence intervals.
When to use Structural Topic Model
- You want topics and a test of how covariates relate to topic prevalence in one model.
- Documents carry metadata such as source, date or respondent group.
- You need interpretable topics with top-probability and FREX words, coherence and exclusivity.
When to use something else
- You only need topics without covariates; use LDA or NMF topic modelling instead.
- You need covariates that change the words used within a topic (content covariates); use the R stm package instead, because this implementation models prevalence only.
Assumptions and requirements
- Each document is a mixture of a fixed number K of topics.
- Topic proportions follow a logistic-normal distribution whose mean is linear in the covariates.
- Results depend on K, preprocessing and initialisation; topics should be checked by reading them. Up to 3,000 documents (a random sample beyond that) and the 1,000 most frequent words are used by default.
What the analysis reports
- Topics with top-probability and FREX words, mean proportion, semantic coherence and exclusivity
- Prevalence effects of each covariate on each topic with 95% intervals (method of composition)
- Optional held-out likelihood and coherence across a grid of K
- Bar chart of expected topic proportions
How to report it
A structural topic model with K = [value] topics was fitted to [value] documents; [covariate] was associated with a higher proportion of Topic [value] ([top words]), estimate = [value], 95% CI [[value], [value]].
Related methods
How this method is validated
이 방법의 검증 근거
- Independent computation. 1 reference test compares the results with SciPy.
독립 계산. SciPy 대조 참조 시험 1건 통과.
Tolerances are relative differences (absolute differences for values near zero). R comparisons and reference tests are re-run before each release of the analysis engine.
허용오차는 상대 차이입니다(0 근처 값은 절대 차이). R 대조와 참조 시험은 분석 엔진을 배포할 때마다 다시 돌립니다.
Run Structural Topic Model on Quorant
- Data you need
- a table (CSV or Excel) with an outcome variable and predictor (feature) columns
- Price
- 600 credits for one analysis up to 10,000 rows (complexity level 4); larger or wider data costs more. Optional methodologist review: 2400 credits.
- Checking
- Compared with independent computations
- Before you pay
- A free pre-analysis diagnosis checks your data and gives an exact quote; nothing is deducted until you approve it.