Learn R Programming

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

stm (version 1.0.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

1.0.1

License

MIT + file LICENSE

Maintainer

Brandon Stewart

Last Published

October 4th, 2014

Functions in stm (1.0.1)

plot.MultimodDiagnostic

Plotting Method for Multimodality Diagnostic Objects
multiSTM

Analyze Stability of Local STM Mode
plotQuote

Plots strings
gadarian

Gadarian and Albertson data
checkResiduals

Residual dispersion test for topic number
labelTopics

Label topics
plot.searchK

Plots diagnostic values resulting from searchK
readCorpus

Read in a corpus file.
plotTopicLoess

Plot some effects with loess
manyTopics

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

Plot a topic correlation graph
estimateEffect

Estimates regressions using an STM object
plot.estimateEffect

Plot effect of covariates on topics
permutationTest

Permutation test of a binary covariate.
cloud

Plot a wordcloud
thetaPosterior

Draw from Theta Posterior
selectModel

Assists the user in selecting the best STM model.
findThoughts

Find Thoughts
plotModels

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

Summary Function for the STM objects
textProcessor

Process a vector of raw texts
topicCorr

Estimate topic correlation
sageLabels

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

CMU 2008 Political Blog Corpus
plot.STMpermute

Plot an STM permutation test.
s

Make a B-spline Basis Function
stm

Variational EM for the Structural Topic Model
topicQuality

Plots semantic coherence and exclusivity for each topic.
make.heldout

Heldout Likelihood by Document Completion
plot.STM

Plot summary of an STM object
plotRemoved

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

Prepare documents for analysis with stm
searchK

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

Write a .ldac file
stm-package

Structural Topic Model