Learn R Programming

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

sts (version 1.3)

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

Description

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) .

Copy Link

Version

Install

install.packages('sts')

Monthly Downloads

207

Version

1.3

License

MIT + file LICENSE

Maintainer

Shawn Mankad

Last Published

January 17th, 2025

Functions in sts (1.3)

findRepresentativeDocs

A Generic Function to Identify Documents that Load Heavily on a Topic
lgaecpp

Estimate Gradient
plot.STS

Function for plotting STS objects
findRepresentativeDocs.STS

Function for Identifying Documents that Load Heavily on a Topic
printRegnTables

Print Estimated Regression Tables
plotRepresentativeDocs

Plot Documents that Load Heavily on a Topic
heldoutLikelihood

Compute Heldout Log-Likelihood
estimateRegns

Regression Table Estimation
sts

Variational EM for the Structural Topic and Sentiment-Discourse (STS) Model
summary.STS

Summary Function for the STS objects
printTopWords.STS

Print Top Words that Load Heavily on each Topic
topicSemanticCoherence

Compute Semantic Coherence
topicExclusivity

Compute Exclusivity
printTopWords

A Generic Function to Print Top Words
esthcpp

Estimate Hessian Matrix
lpbdcpp

Estimate approximate ELBO
sts-package

A Structural Topic and Sentiment-Discourse Model for Text Analysis