Estimation of the Structural Topic Model
Align the vocabulary of a new corpus to an old corpus
STM Corpus Coercion
Calculate FREX (FRequency and EXclusivity) Words
Calculate Lift Words
Calculate Score Words
Looks for words that load exclusively onto a topic
Residual dispersion test for topic number
Plot a wordcloud
Convert stm
formatted documents to another format
Estimates regressions using an STM object
Exclusivity
Find Thoughts
Find topics that contain user specified words.
Fit New Documents
A James-Stein Estimator Shrinking to a Uniform Distribution
Label topics
Make a data.table
of topic proportions.
Heldout Likelihood by Document Completion
Make a Design Matrix
Performs model selection across separate STM's that each assume differ...
Analyze Stability of Local STM Mode
Optimize Document
Permutation test of a binary covariate.
Plot effect of covariates on topics
Plotting Method for Multimodality Diagnostic Objects
Plots diagnostic values resulting from searchK
Functions for plotting STM objects
Plot an STM permutation test.
Plot a topic correlation graph
Plots semantic coherence and exclusivity for high likelihood models ou...
Plots strings
Plot documents, words and tokens removed at various word thresholds
Plot some effects with loess
Prepare documents for analysis with stm
Read in a corpus file.
Read in a .ldac Formatted File
Draw from a Multivariate Normal
Make a B-spline Basis Function
Displays verbose labels that describe topics and topic-covariate group...
Computes diagnostic values for models with different values of K (numb...
Assists the user in selecting the best STM model.
Semantic Coherence
Structural Topic Model
Variational EM for the Structural Topic Model
Summary for estimateEffect
Summary Function for the STM objects
Process a vector of raw texts
Draw from Theta Posterior
Wrapper to launch LDAvis topic browser.
Wrapper to create Json mapping for LDAvis. This can be useful in indir...
Estimate topic correlation
Plot predictions using topics
Plots semantic coherence and exclusivity for each topic.
Unpack a glmnet
object
Write a .ldac file
The Structural Topic Model (STM) allows researchers to estimate topic models with document-level covariates. The package also includes tools for model selection, visualization, and estimation of topic-covariate regressions. Methods developed in Roberts et. al. (2014) <doi:10.1111/ajps.12103> and Roberts et. al. (2016) <doi:10.1080/01621459.2016.1141684>. Vignette is Roberts et. al. (2019) <doi:10.18637/jss.v091.i02>.