Package: sts 1.6

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 (2025) <doi:10.1287/mnsc.2022.00261>.
Authors:
sts_1.6.tar.gz
sts_1.6.zip(r-4.7-x86_64)sts_1.6.zip(r-4.7-arm64)sts_1.6.zip(r-4.6-x86_64)sts_1.6.zip(r-4.6-arm64)sts_1.6.zip(r-4.5-x86_64)
sts_1.6.tgz(r-4.6-x86_64)sts_1.6.tgz(r-4.6-arm64)sts_1.6.tgz(r-4.5-x86_64)sts_1.6.tgz(r-4.5-arm64)
sts_1.6.tar.gz(r-4.7-arm64)sts_1.6.tar.gz(r-4.7-x86_64)sts_1.6.tar.gz(r-4.6-arm64)sts_1.6.tar.gz(r-4.6-x86_64)
sts_1.6.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
sts/json (API)
| # Install 'sts' in R: |
| install.packages('sts', repos = c('https://mankad-research.r-universe.dev', 'https://cloud.r-project.org')) |
Bug tracker:https://github.com/mankad-research/sts_r/issues
- gadarian - Gadarian and Albertson data
Last updated from:da7d4bd52b. Checks:15 OK. Indexed: yes.
| Target | Result | Time | Files | Syslog |
|---|---|---|---|---|
| linux-devel-arm64 | OK | 151 | ||
| linux-devel-x86_64 | OK | 177 | ||
| source / vignettes | OK | 412 | ||
| linux-release-arm64 | OK | 308 | ||
| linux-release-x86_64 | OK | 277 | ||
| macos-release-arm64 | OK | 223 | ||
| macos-release-x86_64 | OK | 391 | ||
| macos-oldrel-arm64 | OK | 249 | ||
| macos-oldrel-x86_64 | OK | 458 | ||
| windows-devel-arm64 | OK | 436 | ||
| windows-devel-x86_64 | OK | 238 | ||
| windows-release-arm64 | OK | 430 | ||
| windows-release-x86_64 | OK | 284 | ||
| windows-oldrel-x86_64 | OK | 128 | ||
| wasm-release | OK | 266 |
Exports:esthcppestimateRegnsfindRepresentativeDocsheldoutLikelihoodlgaecpplpbdcppmake.heldoutplotRepresentativeDocsprepDocumentsprintRegnTablesprintTopWordsststextProcessortopicExclusivitytopicSemanticCoherence
Dependencies:BHclicodetoolscpp11doParallelfarverforeachggplot2glmnetgluegtableisobanditeratorslabelinglatticelifecycleMatrixmatrixStatsmvtnormNLPR6RColorBrewerRcppRcppArmadilloRcppEigenrlangS7scalesshapeslamSnowballCsurvivaltmvctrsviridisLitewithrxml2
Readme and manuals
Help Manual
| Help page | Topics |
|---|---|
| A Structural Topic and Sentiment-Discourse Model for Text Analysis | sts-package |
| Regression Table Estimation | estimateRegns |
| Function for Identifying Documents that Load Heavily on a Topic | findRepresentativeDocs |
| Gadarian and Albertson data | gadarian |
| Compute Heldout Log-Likelihood | heldoutLikelihood |
| Heldout Likelihood by Document Completion | make.heldout |
| Function for plotting STS objects | plot.STS |
| Plot Documents that Load Heavily on a Topic | plotRepresentativeDocs |
| Prepare Documents for Analysis | prepDocuments |
| Print Estimated Regression Tables | printRegnTables |
| Print Top Words that Load Heavily on each Topic | printTopWords |
| Variational EM for the Structural Topic and Sentiment-Discourse (STS) Model | sts |
| Summary Function for the STS objects | print.STS summary.STS |
| Process a Vector of Raw Texts | textProcessor |
| Compute Exclusivity | topicExclusivity |
| Compute Semantic Coherence | topicSemanticCoherence |
