Learn R Programming

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

stm (version 0.6.12)

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

0.6.12

License

MIT + file LICENSE

Maintainer

Brandon Stewart

Last Published

May 14th, 2014

Functions in stm (0.6.12)

prepDocuments

Prepare documents for analysis with stm
topicCorr

Estimate topic correlation
stm-package

Structural Topic Model
readCorpus

Read in a corpus file.
poliblog5k

CMU 2008 Political Blog Corpus
selectModel

Assists the user in selecting the best STM model.
gadarian

Gadarian and Albertson data
plotQuote

Plots strings
plotTopicLoess

Plot some effects with loess
plot.STM

Plot summary of an STM object
permutationTest

Permutation test of a binary covariate.
manyTopics

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

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

Plot a topic correlation graph
topicQuality

Plots semantic coherence and exclusivity for each topic.
textProcessor

Process a vector of raw texts
plot.STMpermute

Plot an STM permutation test.
termitewriter

Termite writer
plot.estimateEffect

Plot effect of covariates on topics
findThoughts

Find Thoughts
stm

Variational EM for the Structural Topic Model
estimateEffect

Estimates regressions using an STM object
labelTopics

Label topics
summary.STM

Summary Function for the STM objects
s

Make a B-spline Basis Function