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 `stm` R package, which implements the structural topic model (STM), a flexible tool for estimating topic models that incorporate document-level metadata. The STM allows researchers to model and analyze text data, such as international newspapers, survey responses, and social media posts, by incorporating metadata into the topic modeling framework. The package provides a range of features for data processing, model estimation, and visualization. Key innovations of the STM include the ability to model topical prevalence and topical content, allowing metadata to influence both the frequency of topics and the words used within topics. The paper outlines the technical aspects of the STM, including its generative model and estimation methods, and provides detailed examples of how to use the `stm` package to estimate and interpret STM models. It also discusses model selection, evaluation, and visualization techniques, emphasizing the package's utility for social science research.The paper introduces the `stm` R package, which implements the structural topic model (STM), a flexible tool for estimating topic models that incorporate document-level metadata. The STM allows researchers to model and analyze text data, such as international newspapers, survey responses, and social media posts, by incorporating metadata into the topic modeling framework. The package provides a range of features for data processing, model estimation, and visualization. Key innovations of the STM include the ability to model topical prevalence and topical content, allowing metadata to influence both the frequency of topics and the words used within topics. The paper outlines the technical aspects of the STM, including its generative model and estimation methods, and provides detailed examples of how to use the `stm` package to estimate and interpret STM models. It also discusses model selection, evaluation, and visualization techniques, emphasizing the package's utility for social science research.
Reach us at info@study.space
Understanding stm%3A An R Package for Structural Topic Models