Learn R Programming

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

stm (version 1.1.3)

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

3,041

Version

1.1.3

License

MIT + file LICENSE

Maintainer

Brandon Stewart

Last Published

January 14th, 2016

Functions in stm (1.1.3)

plot.topicCorr

Plot a topic correlation graph
searchK

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

Plots semantic coherence and exclusivity for each topic.
stm

Variational EM for the Structural Topic Model
plot.STM

Plot summary of an STM object
stm-package

Structural Topic Model
permutationTest

Permutation test of a binary covariate.
prepDocuments

Prepare documents for analysis with stm
poliblog5k

CMU 2008 Political Blog Corpus
summary.STM

Summary Function for the STM objects
plotModels

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

Write a .ldac file
textProcessor

Process a vector of raw texts
topicLasso

Plot predictions using topics
findThoughts

Find Thoughts
plotTopicLoess

Plot some effects with loess
plot.STMpermute

Plot an STM permutation test.
topicCorr

Estimate topic correlation
labelTopics

Label topics
thetaPosterior

Draw from Theta Posterior
plot.searchK

Plots diagnostic values resulting from searchK
estimateEffect

Estimates regressions using an STM object
sageLabels

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

Residual dispersion test for topic number
convertCorpus

Convert stm formatted documents to another format
plot.MultimodDiagnostic

Plotting Method for Multimodality Diagnostic Objects
gadarian

Gadarian and Albertson data
plotRemoved

Plot documents, words and tokens removed at various word thresholds
manyTopics

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

Plot effect of covariates on topics
readCorpus

Read in a corpus file.
multiSTM

Analyze Stability of Local STM Mode
cloud

Plot a wordcloud
findTopic

Find topics that contain user specified words.
selectModel

Assists the user in selecting the best STM model.
s

Make a B-spline Basis Function
plotQuote

Plots strings
make.heldout

Heldout Likelihood by Document Completion
toLDAvis

Wrapper to launch LDAvis topic browser.