Learn R Programming

⚠️There's a newer version (1.3.8) of this package.Take me there.

stm (version 1.0.0)

Estimation of the Structural Topic Model

Description

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.

Copy Link

Version

Install

install.packages('stm')

Monthly Downloads

6,451

Version

1.0.0

License

MIT + file LICENSE

Maintainer

Brandon Stewart

Last Published

October 2nd, 2014

Functions in stm (1.0.0)

cloud

Plot a wordcloud
plotModels

Plots semantic coherence and exclusivity for high likelihood models outputted from selectModel.
stm

Variational EM for the Structural Topic Model
topicQuality

Plots semantic coherence and exclusivity for each topic.
plotRemoved

Produces a plot of number of words, documents, and tokens removed by prepDocuments for different threshholds.
manyTopics

Performs model selection across separate STM's that each assume different numbers of topics.
s

Make a B-spline Basis Function
searchK

Computes diagnostic values for models with different values of K (number of topics).
plot.topicCorr

Plot a topic correlation graph
plotTopicLoess

Plot some effects with loess
estimateEffect

Estimates regressions using an STM object
plot.STM

Plot summary of an STM object
thetaPosterior

Draw from Theta Posterior
plot.estimateEffect

Plot effect of covariates on topics
poliblog5k

CMU 2008 Political Blog Corpus
make.heldout

Heldout Likelihood by Document Completion
plotQuote

Plots strings
writeLdac

Write a .ldac file
plot.searchK

Plots diagnostic values resulting from searchK
multiSTM

Analyze Stability of Local STM Mode
textProcessor

Process a vector of raw texts
labelTopics

Label topics
gadarian

Gadarian and Albertson data
plot.STMpermute

Plot an STM permutation test.
readCorpus

Read in a corpus file.
topicCorr

Estimate topic correlation
selectModel

Assists the user in selecting the best STM model.
plot.MultimodDiagnostic

Plotting Method for Multimodality Diagnostic Objects
permutationTest

Permutation test of a binary covariate.
stm-package

Structural Topic Model
findThoughts

Find Thoughts
checkResiduals

Residual dispersion test for topic number
sageLabels

Displays verbose labels that describe topics and topic-covariate groups in depth.
summary.STM

Summary Function for the STM objects
prepDocuments

Prepare documents for analysis with stm