In this article, I introduce the ldagibbs command, which implements latent Dirichlet allocation in Stata. Latent Dirichlet allocation is the most popular machine-learning topic model. Topic models automatically cluster text documents into a user-chosen number of topics. Latent Dirichlet allocation represents each document as a probability distribution over topics and represents each topic as a probability distribution over words. Therefore, latent Dirichlet allocation provides a way to analyze the content of large unclassified text data and an alternative to predefined document classifications.
BarkerM.2012. strdist: Stata module to calculate the Levenshtein distance, or edit distance, between strings. Statistical Software Components S457547, Department of Economics, Boston College. https://ideas.repec.org/c/boc/bocode/s457547.html.
2.
BelottiF., and DepaloD.2010. Translation from narrative text to standard codes variables with Stata. Stata Journal10: 458–481.
3.
BleiD. M., NgA. Y., and JordanM. I.2003. Latent Dirichlet allocation. Journal of Machine Learning Research3: 993–1022.
4.
GriffithsT. L., and SteyversM.2004. Finding scientific topics. Proceedings of the National Academy of Sciences101: 5228–5235.
5.
HansenS., McMahonM., and PratA. Forthcoming. Transparency and deliberation within the FOMC: A computational linguistics approach. Quarterly Journal of Economics.
6.
HongL., and DavisonB. D.2010. Empirical study of topic modeling in Twitter. In Proceedings of the First Workshop on Social Media Analytics, 80–88. New York: ACM.
7.
KimY., and ShimK.2014. TWILITE: A recommendation system for Twitter using a probabilistic model based on latent Dirichlet allocation. Information Systems42: 59–77.
8.
QuanX., KitC., GeY., and PanS. J.2015. Short and sparse text topic modeling via self-aggregation. In Proceedings of the Twenty-Fourth International Joint Conference on Artificial Intelligence, 2270–2276. Buenos Aires, Argentina: AAAI Press.
9.
Rosen-ZviM., GriffithsT., SteyversM., and SmythP.2004. The author-topic model for authors and documents. In Proceedings of the Twentieth Conference on Uncertainty in Artificial Intelligence, 487–494. Banff, Canada: AUAI Press.
10.
ThompsonJ., PalmerT., and MorenoS.2006. Bayesian analysis in Stata with Win-BUGS. Stata Journal6: 530–549.
11.
WilliamsU., and WilliamsS. P.2014. txttool: Utilities for text analysis in Stata. Stata Journal14: 817–829.
12.
WuY., LiuM., ZhengW. J., ZhaoZ., and XuH.2012. Ranking gene–drug relationships in biomedical literature using latent Dirichlet allocation. Pacific Symposium on Biocomputing422–433.
13.
YanX., GuoJ., LanY., and ChengX.2013. A biterm topic model for short texts. In Proceedings of the 22nd International World Wide Web Conference, 1445–1456. New York: ACM.
14.
ZhaoW. X., JiangJ., WengJ., HeJ., LimE.-P., YanH., and LiX.2011. Comparing Twitter and traditional media using topic models. In Proceedings of the 33rd European Conference on Information Retrieval Research, 338–349. Berlin: ECIR.