sts: Estimation of the Structural Topic and Sentiment-Discourse Model for Text Analysis

The Structural Topic and Sentiment-Discourse (STS) model allows researchers to estimate topic models with document-level metadata that determines both topic prevalence and sentiment-discourse. The sentiment-discourse is modeled as a document-level latent variable for each topic that modulates the word frequency within a topic. These latent topic sentiment-discourse variables are controlled by the document-level metadata. The STS model can be useful for regression analysis with text data in addition to topic modeling’s traditional use of descriptive analysis. The method was developed in Chen and Mankad (2025) <doi:10.1287/mnsc.2022.00261>.

Version: 1.6
Depends: R (≥ 3.5.0)
Imports: Rcpp, glmnet, matrixStats, slam, foreach, doParallel, parallel, Matrix, mvtnorm, ggplot2, tm, SnowballC, graphics, stats
LinkingTo: Rcpp, RcppArmadillo
Suggests: R.rsp
Published: 2026-10-23
DOI: 10.32614/CRAN.package.sts
Author: Shawn Mankad [aut, cre], Li Chen [aut], Margaret E. Roberts [ctb, cph] (Author of adapted code from the stm package), Brandon M. Stewart [ctb, cph] (Author of adapted code from the stm package), Dustin Tingley [ctb, cph] (Author of adapted code from the stm package)
Maintainer: Shawn Mankad <smankad at ncsu.edu>
BugReports: https://github.com/mankad-research/sts_r/issues
License: MIT + file LICENSE
Copyright: see file COPYRIGHTS
URL: https://github.com/mankad-research/sts_r
NeedsCompilation: yes
Materials: NEWS
CRAN checks: sts results

Documentation:

Reference manual: sts.html , sts.pdf
Vignettes: Using the STS package (source)

Downloads:

Package source: sts_1.6.tar.gz
Windows binaries: r-devel: sts_1.4.zip, r-release: sts_1.4.zip, r-oldrel: sts_1.4.zip
macOS binaries: r-release (arm64): sts_1.4.tgz, r-oldrel (arm64): sts_1.4.tgz, r-release (x86_64): sts_1.4.tgz, r-oldrel (x86_64): sts_1.4.tgz
Old sources: sts archive

Linking:

Please use the canonical form https://CRAN.R-project.org/package=sts to link to this page.