Learn R Programming

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

stm (version 0.6.1)

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

License

MIT + file LICENSE

Maintainer

Brandon Stewart

Last Published

February 28th, 2014

Functions in stm (0.6.1)

topicCorr

Estimate topic correlation
s

Make a B-spline Basis Function
plotQuote

Plots strings
plot.topicCorr

Plot a topic correlation graph
plot.STM

Plot summary of an STM object
summary.STM

Summary Function for the STM objects
manyTopics

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

Plot effect of covariates on topics
estimateEffect

Estimates regressions using an STM object
poliblog5k

CMU 2008 Political Blog Corpus
plot.STMpermute

Plot an STM permutation test.
permutationTest

Permutation test of a binary covariate.
readCorpus

Read in a corpus file.
selectModel

Assists the user in selecting the best STM model.
plotModels

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

Plots semantic coherence and exclusivity for each topic.
gadarian

Gadarian and Albertson data
findThoughts

Find Thoughts
prepDocuments

Prepare documents for analysis with stm
stm

Variational EM for the Structural Topic Model
stm-package

Structural Topic Model
plotTopicLoess

Plot some effects with loess
textProcessor

Process a vector of raw texts
termitewriter

Termite writer
labelTopics

Label topics