Package: sts 1.4

Shawn Mankad

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 (2024) <doi:10.1287/mnsc.2022.00261>.

Authors:Shawn Mankad [aut, cre], Li Chen [aut]

sts_1.4.tar.gz
sts_1.4.tar.gz(r-4.5-noble)sts_1.4.tar.gz(r-4.4-noble)
sts_1.4.tgz(r-4.4-emscripten)sts_1.4.tgz(r-4.3-emscripten)
sts.pdf |sts.html
sts/json (API)

# Install 'sts' in R:
install.packages('sts', repos = 'https://cloud.r-project.org')
Uses libs:
  • openblas– Optimized BLAS
  • c++– GNU Standard C++ Library v3

On CRAN:

Conda:

This package does not link to any Github/Gitlab/R-forge repository. No issue tracker or development information is available.

openblascpp

2.70 score 173 downloads 12 exports 58 dependencies

Last updated 2 months agofrom:67c0b3f6f5. Checks:3 OK. Indexed: yes.

TargetResultLatest binary
Doc / VignettesOKMar 28 2025
R-4.5-linux-x86_64OKMar 28 2025
R-4.4-linux-x86_64OKMar 28 2025

Exports:esthcppestimateRegnsfindRepresentativeDocsheldoutLikelihoodlgaecpplpbdcppplotRepresentativeDocsprintRegnTablesprintTopWordsststopicExclusivitytopicSemanticCoherence

Dependencies:BHclicodetoolscolorspacedata.tabledoParallelfansifarverfastmatchforeachggplot2glmnetgluegtableisobandISOcodesiteratorsjsonlitelabelinglatticeldalifecyclemagrittrMASSMatrixmatrixStatsmgcvmunsellmvtnormnlmeNLPpillarpkgconfigquadprogquantedaR6RColorBrewerRcppRcppArmadilloRcppEigenrlangscalesshapeslamSnowballCstmstopwordsstringistringrsurvivaltibbletmutf8vctrsviridisLitewithrxml2yaml

Using the STS package

Rendered fromvignette.Rnwusingknitr::knitron Mar 28 2025.

Last update: 2025-01-17
Started: 2025-01-17

Citation

To cite package ‘sts’ in publications use:

Mankad S, Chen L (2025). sts: Estimation of the Structural Topic and Sentiment-Discourse Model for Text Analysis. R package version 1.4, https://CRAN.R-project.org/package=sts.

Corresponding BibTeX entry:

  @Manual{,
    title = {sts: Estimation of the Structural Topic and
      Sentiment-Discourse Model for Text Analysis},
    author = {Shawn Mankad and Li Chen},
    year = {2025},
    note = {R package version 1.4},
    url = {https://CRAN.R-project.org/package=sts},
  }