stm: Estimation of the Structural Topic Model
Version 1.2.2

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.

Browse man pages Browse package API and functions Browse package files

AuthorMargaret Roberts [aut, cre], Brandon Stewart [aut, cre], Dustin Tingley [aut, cre], Kenneth Benoit [ctb]
Date of publication2017-03-28 21:10:28 UTC
MaintainerBrandon Stewart <bms4@princeton.edu>
LicenseMIT + file LICENSE
Version1.2.2
URL http://structuraltopicmodel.com
Package repositoryView on CRAN
InstallationInstall the latest version of this package by entering the following in R:
install.packages("stm")

Man pages

calcfrex: Calculate FREX (FRequency and EXclusivity) Words
calclift: Calculate Lift Words
calcscore: Calculate Score Words
checkBeta: Looks for words that load exclusively onto a topic
checkResiduals: Residual dispersion test for topic number
cloud: Plot a wordcloud
convertCorpus: Convert 'stm' formatted documents to another format
estimateEffect: Estimates regressions using an STM object
exclusivity: Exclusivity
findThoughts: Find Thoughts
findTopic: Find topics that contain user specified words.
fitNewDocuments: Fit New Documents
gadarian: Gadarian and Albertson data
js.estimate: A James-Stein Estimator Shrinking to a Uniform Distribution
labelTopics: Label topics
makeDesignMatrix: Make a Design Matrix
make.dt: Make a 'data.table' of topic proportions.
make.heldout: Heldout Likelihood by Document Completion
manyTopics: Performs model selection across separate STM's that each...
multiSTM: Analyze Stability of Local STM Mode
optimizeDocument: Optimize Document
permutationTest: Permutation test of a binary covariate.
plot.estimateEffect: Plot effect of covariates on topics
plotModels: Plots semantic coherence and exclusivity for high likelihood...
plot.MultimodDiagnostic: Plotting Method for Multimodality Diagnostic Objects
plotQuote: Plots strings
plotRemoved: Plot documents, words and tokens removed at various word...
plot.searchK: Plots diagnostic values resulting from searchK
plot.STM: Functions for plotting STM objects
plot.STMpermute: Plot an STM permutation test.
plot.topicCorr: Plot a topic correlation graph
plotTopicLoess: Plot some effects with loess
poliblog5k: CMU 2008 Political Blog Corpus
prepDocuments: Prepare documents for analysis with 'stm'
readCorpus: Read in a corpus file.
rmvnorm: Draw from a Multivariate Normal
s: Make a B-spline Basis Function
sageLabels: Displays verbose labels that describe topics and...
searchK: Computes diagnostic values for models with different values...
selectModel: Assists the user in selecting the best STM model.
semanticCoherence: Semantic Coherence
stm: Variational EM for the Structural Topic Model
stm-package: Structural Topic Model
summary.estimateEffect: Summary for estimateEffect
summary.STM: Summary Function for the STM objects
textProcessor: Process a vector of raw texts
thetaPosterior: Draw from Theta Posterior
toLDAvis: Wrapper to launch LDAvis topic browser.
topicCorr: Estimate topic correlation
topicLasso: Plot predictions using topics
topicQuality: Plots semantic coherence and exclusivity for each topic.
unpack.glmnet: Unpack a 'glmnet' object
writeLdac: Write a .ldac file

Functions

TJciloess Source code
bounds_docs.MultimodDiagnostic Source code
bounds_l1.MultimodDiagnostic Source code
bounds_l1lim.MultimodDiagnostic Source code
bounds_words.MultimodDiagnostic Source code
calcfrex Man page Source code
calclift Man page Source code
calcscore Man page Source code
checkBeta Man page Source code
checkResiduals Man page Source code
cloud Man page Source code
col.lse Source code
commas Source code
confidence_intervals.MultimodDiagnostic Source code
convergence.check Source code
convert.Matrix Source code
convert.lda Source code
convert.slam Source code
convertCorpus Man page Source code
createLabels Source code
doc.to.ijv Source code
docsexpectation.MultimodDiagnostic Source code
estep Source code
estimateEffect Man page Source code
eval.heldout Man page Source code
exclusivity Man page Source code
expgrad Source code
fastAnchor Source code
findThoughts Man page Source code
findTopic Man page Source code
fitNewDocuments Man page Source code
gadarian Man page
gadarianFit Man page
gradcpp Source code
gram Source code
gram.rp Source code
head.textProcessor Man page Source code
hist_l1lim.MultimodDiagnostic Source code
hpbcpp Source code
ijv.to.doc Source code
is.wholenumber Source code
jeffreys Source code
jeffreysKappa Source code
js.estimate Man page Source code
kappa.gradient Source code
kappa.init Source code
kappa.obj Source code
l1_l1lim.MultimodDiagnostic Source code
l1_topdocs.MultimodDiagnostic Source code
l1_topwords.MultimodDiagnostic Source code
l1expectation.MultimodDiagnostic Source code
labelTopics Man page Source code
lhoodcpp Source code
ln.hess Source code
logisticnormalcpp Source code
logsoftmax Source code
lse Source code
make.dt Man page Source code
make.heldout Man page Source code
makeDesignMatrix Man page Source code
makepredictcall.s Source code
manyTopics Man page Source code
mnreg Source code
mpinv Source code
multiSTM Man page Source code
newton Source code
onAttach Source code
opt.beta Source code
opt.kappak Source code
opt.mu Source code
opt.sigma Source code
opt.tau Source code
optimizeDocument Man page Source code
outputdata Source code
paretosingle Source code
permutationTest Man page Source code
plot.MultimodDiagnostic Man page Source code
plot.STM Man page Source code
plot.STMpermute Man page Source code
plot.estimateEffect Man page Source code
plot.findThoughts Man page Source code
plot.searchK Man page Source code
plot.topicCorr Man page Source code
plotContinuous Source code
plotDifference Source code
plotModels Man page Source code
plotPointEstimate Source code
plotQuote Man page Source code
plotRemoved Man page Source code
plotTopicLoess Man page Source code
poliblog5k Man page
poliblog5k.docs Man page
poliblog5k.meta Man page
poliblog5k.voc Man page
pooledvar Source code
posint Source code
predict.s Source code
prepDocuments Man page Source code
print.MultimodDiagnostic Man page Source code
print.STM Man page Source code
print.findThoughts Man page Source code
print.labelTopics Man page Source code
print.sageLabels Man page Source code
print.summary.estimateEffect Man page Source code
print.textProcessor Man page Source code
produce_cmatrix Source code
qr.lm Source code
read.dtm Source code
read.ldac Source code
read.slam Source code
read.txtorg.vocab Source code
readCorpus Man page Source code
recoverL2 Source code
report Source code
rmvnorm Man page Source code
row.lse Source code
s Man page Source code
safelog Source code
sageLabels Man page Source code
searchK Man page Source code
selectModel Man page Source code
semCoh1beta Source code
semanticCoherence Man page Source code
semcoh_docs.MultimodDiagnostic Source code
semcoh_l1.MultimodDiagnostic Source code
semcoh_l1lim.MultimodDiagnostic Source code
semcoh_words.MultimodDiagnostic Source code
simBetas Source code
softmax Source code
stm Man page Source code
stm-package Man page
stm.control Source code
stm.dfm Source code
stm.init Source code
stm.list Source code
summary.STM Man page Source code
summary.estimateEffect Man page Source code
summary.qr.lm Source code
summary.textProcessor Man page Source code
textProcessor Man page Source code
thetaPosterior Man page Source code
thetapost.global Source code
thetapost.local Source code
tjloesssim Source code
toLDAvis Man page Source code
topdocs_l1lim.MultimodDiagnostic Source code
topicCorr Man page Source code
topicLasso Man page Source code
topicQuality Man page Source code
topic_hist.MultimodDiagnostic Source code
topwords_topdocs.MultimodDiagnostic Source code
tsneAnchor Source code
unpack.glmnet Man page Source code
vb.variational.reg Source code
wordsexpectation.MultimodDiagnostic Source code
writeLdac Man page Source code

Files

inst
inst/CITATION
inst/NEWS.Rd
inst/doc
inst/doc/stmVignette.Rnw
inst/doc/stmVignette.R
inst/doc/stmVignette.pdf
tests
tests/testthat.R
tests/testthat
tests/testthat/test-visualize.R
tests/testthat/test-stm-options.R
tests/testthat/test-prepare.R
tests/testthat/test-quanteda-stm.R
src
src/Makevars
src/STMCfuns.cpp
src/Makevars.win
src/init.c
src/RcppExports.cpp
NAMESPACE
data
data/gadarianFit.RData
data/poliblog5k.RData
data/datalist
data/gadarian.RData
R
R/plottingutilfns.R
R/STMlncpp.R
R/labelTopics.R
R/plot.STM.R
R/stm.R
R/checkBeta.R
R/spectral.R
R/STMestep.R
R/multiSTM.R
R/findTopic.R
R/readCorpus.R
R/selectModel.R
R/simBetas.R
R/STMreport.R
R/toLDAvis.R
R/STMoptbeta.R
R/topicLasso.R
R/plotRemoved.R
R/plot.searchK.R
R/topicCorr.R
R/semanticCoherence.R
R/exclusivity.R
R/RcppExports.R
R/makeDesignMatrix.R
R/topicQuality.R
R/STMsigma.R
R/plotModels.R
R/plotQuote.R
R/sageLabels.R
R/findThoughts.R
R/textProcessor.R
R/thetaPosterior.R
R/fitNewDocuments.R
R/STMfunctions.R
R/STMmnreg.R
R/summary.STM.R
R/manyTopics.R
R/plot.estimateEffect.R
R/STMconvergence.R
R/produce_cmatrix.R
R/stm-package.R
R/prepDocuments.R
R/tau.R
R/searchK.R
R/estimateEffect.R
R/s.R
R/plotTopicLoess.R
R/STMmu.R
R/writeLdac.R
R/stm.control.R
R/heldout.R
R/permute.R
R/STMinit.R
R/zzz.R
R/cloud.R
R/convertCorpus.R
R/jeffreyskappa.R
R/residuals.R
vignettes
vignettes/stmVignette.Rnw
vignettes/apsr.bst
vignettes/multimod.png
vignettes/natbib.bst
vignettes/Flowchart.pdf
vignettes/jsslogo.jpg
vignettes/extracted.bib
vignettes/STMdiagram.pdf
MD5
build
build/vignette.rds
DESCRIPTION
man
man/poliblog5k.Rd
man/convertCorpus.Rd
man/rmvnorm.Rd
man/exclusivity.Rd
man/searchK.Rd
man/plotQuote.Rd
man/semanticCoherence.Rd
man/fitNewDocuments.Rd
man/summary.estimateEffect.Rd
man/unpack.glmnet.Rd
man/selectModel.Rd
man/topicCorr.Rd
man/plot.STMpermute.Rd
man/summary.STM.Rd
man/plot.topicCorr.Rd
man/textProcessor.Rd
man/permutationTest.Rd
man/plot.estimateEffect.Rd
man/multiSTM.Rd
man/cloud.Rd
man/findThoughts.Rd
man/plot.STM.Rd
man/topicLasso.Rd
man/makeDesignMatrix.Rd
man/thetaPosterior.Rd
man/sageLabels.Rd
man/plotTopicLoess.Rd
man/gadarian.Rd
man/topicQuality.Rd
man/js.estimate.Rd
man/plot.MultimodDiagnostic.Rd
man/prepDocuments.Rd
man/stm.Rd
man/calclift.Rd
man/optimizeDocument.Rd
man/calcscore.Rd
man/plot.searchK.Rd
man/plotModels.Rd
man/findTopic.Rd
man/s.Rd
man/calcfrex.Rd
man/stm-package.Rd
man/make.dt.Rd
man/labelTopics.Rd
man/make.heldout.Rd
man/plotRemoved.Rd
man/checkResiduals.Rd
man/manyTopics.Rd
man/estimateEffect.Rd
man/readCorpus.Rd
man/toLDAvis.Rd
man/writeLdac.Rd
man/checkBeta.Rd
LICENSE
stm documentation built on May 19, 2017, 11:44 a.m.