Learn R Programming

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

stm (version 1.0.8)

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

License

MIT + file LICENSE

Maintainer

Brandon Stewart

Last Published

November 8th, 2014

Functions in stm (1.0.8)

checkResiduals

Residual dispersion test for topic number
plotQuote

Plots strings
plot.MultimodDiagnostic

Plotting Method for Multimodality Diagnostic Objects
topicCorr

Estimate topic correlation
searchK

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

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

Structural Topic Model
gadarian

Gadarian and Albertson data
plotTopicLoess

Plot some effects with loess
estimateEffect

Estimates regressions using an STM object
topicQuality

Plots semantic coherence and exclusivity for each topic.
stm

Variational EM for the Structural Topic Model
textProcessor

Process a vector of raw texts
plot.STMpermute

Plot an STM permutation test.
poliblog5k

CMU 2008 Political Blog Corpus
plot.estimateEffect

Plot effect of covariates on topics
multiSTM

Analyze Stability of Local STM Mode
plotModels

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

Find Thoughts
permutationTest

Permutation test of a binary covariate.
plot.STM

Plot summary of an STM object
plot.topicCorr

Plot a topic correlation graph
readCorpus

Read in a corpus file.
plot.searchK

Plots diagnostic values resulting from searchK
cloud

Plot a wordcloud
s

Make a B-spline Basis Function
make.heldout

Heldout Likelihood by Document Completion
labelTopics

Label topics
selectModel

Assists the user in selecting the best STM model.
writeLdac

Write a .ldac file
summary.STM

Summary Function for the STM objects
prepDocuments

Prepare documents for analysis with stm
manyTopics

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

Draw from Theta Posterior
plotRemoved

Plot documents, words and tokens removed at various word thresholds