stm: An R Package for Structural Topic Models

stm: An R Package for Structural Topic Models

October 2019 | Margaret E. Roberts, Brandon M. Stewart, Dustin Tingley
The paper introduces the R package 'stm' for structural topic modeling, which allows researchers to incorporate document-level metadata into topic models. The package uses a fast variational approximation for estimation and provides tools for exploring topics, estimating uncertainty, and visualizing results. The structural topic model (STM) extends traditional topic models like LDA by allowing metadata to influence both topic prevalence and content. The STM can be used to analyze text data from various sources, including news articles, surveys, and social media. The package includes functions for data ingestion, preprocessing, model estimation, evaluation, and visualization. The paper demonstrates how to use the package to estimate an STM model, evaluate model performance, and visualize results. It also discusses advanced features such as model selection, topic correlation analysis, and visualization tools. The STM package provides a flexible framework for analyzing text data with metadata, enabling researchers to explore relationships between topics and document characteristics.The paper introduces the R package 'stm' for structural topic modeling, which allows researchers to incorporate document-level metadata into topic models. The package uses a fast variational approximation for estimation and provides tools for exploring topics, estimating uncertainty, and visualizing results. The structural topic model (STM) extends traditional topic models like LDA by allowing metadata to influence both topic prevalence and content. The STM can be used to analyze text data from various sources, including news articles, surveys, and social media. The package includes functions for data ingestion, preprocessing, model estimation, evaluation, and visualization. The paper demonstrates how to use the package to estimate an STM model, evaluate model performance, and visualize results. It also discusses advanced features such as model selection, topic correlation analysis, and visualization tools. The STM package provides a flexible framework for analyzing text data with metadata, enabling researchers to explore relationships between topics and document characteristics.
Reach us at info@study.space