Learn R Programming

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

stm (version 0.6.24)

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.24

License

MIT + file LICENSE

Maintainer

Brandon Stewart

Last Published

June 30th, 2014

Functions in stm (0.6.24)

cloud

Plot a wordcloud
permutationTest

Permutation test of a binary covariate.
factorCheck

Control for topics loading exclusively on a single covariate level
plotTopicLoess

Plot some effects with loess
topicQuality

Plots semantic coherence and exclusivity for each topic.
plot.STMpermute

Plot an STM permutation test.
plotQuote

Plots strings
manyTopics

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

Summary Function for the STM objects
plot.STM

Plot summary of an STM object
plotModels

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

Label topics
findThoughts

Find Thoughts
topicCorr

Estimate topic correlation
s

Make a B-spline Basis Function
gadarian

Gadarian and Albertson data
plot.topicCorr

Plot a topic correlation graph
estimateEffect

Estimates regressions using an STM object
plot.estimateEffect

Plot effect of covariates on topics
poliblog5k

CMU 2008 Political Blog Corpus
selectModel

Assists the user in selecting the best STM model.
termitewriter

Termite writer
stm

Variational EM for the Structural Topic Model
textProcessor

Process a vector of raw texts
readCorpus

Read in a corpus file.
prepDocuments

Prepare documents for analysis with stm
stm-package

Structural Topic Model