Estimating text regressions using txtreg_train

IF 3.2 2区 数学 Q1 SOCIAL SCIENCES, MATHEMATICAL METHODS Stata Journal Pub Date : 2023-09-01 DOI:10.1177/1536867x231196349
Carlo Schwarz
{"title":"Estimating text regressions using txtreg_train","authors":"Carlo Schwarz","doi":"10.1177/1536867x231196349","DOIUrl":null,"url":null,"abstract":"In this article, I introduce new commands to estimate text regressions for continuous, binary, and categorical variables based on text strings. The command txtreg_train automatically handles text cleaning, tokenization, model training, and cross-validation for lasso, ridge, elastic-net, and regularized logistic regressions. The txtreg_predict command obtains the predictions from the trained text regression model. Furthermore, the txtreg_analyze command facilitates the analysis of the coefficients of the text regression model. Together, these commands provide a convenient toolbox for researchers to train text regressions. They also allow sharing of pretrained text regression models with other researchers.","PeriodicalId":51171,"journal":{"name":"Stata Journal","volume":"368 1","pages":"0"},"PeriodicalIF":3.2000,"publicationDate":"2023-09-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Stata Journal","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1177/1536867x231196349","RegionNum":2,"RegionCategory":"数学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"SOCIAL SCIENCES, MATHEMATICAL METHODS","Score":null,"Total":0}
引用次数: 0

Abstract

In this article, I introduce new commands to estimate text regressions for continuous, binary, and categorical variables based on text strings. The command txtreg_train automatically handles text cleaning, tokenization, model training, and cross-validation for lasso, ridge, elastic-net, and regularized logistic regressions. The txtreg_predict command obtains the predictions from the trained text regression model. Furthermore, the txtreg_analyze command facilitates the analysis of the coefficients of the text regression model. Together, these commands provide a convenient toolbox for researchers to train text regressions. They also allow sharing of pretrained text regression models with other researchers.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
使用txtreg_train估计文本回归
在本文中,我将介绍一些新的命令,用于基于文本字符串估计连续变量、二进制变量和分类变量的文本回归。命令txtreg_train自动处理lasso、ridge、elastic-net和正则化逻辑回归的文本清理、标记化、模型训练和交叉验证。txtreg_predict命令从经过训练的文本回归模型中获得预测结果。此外,txtreg_analyze命令有助于分析文本回归模型的系数。总之,这些命令为研究人员提供了一个方便的工具箱来训练文本回归。它们还允许与其他研究人员共享预训练的文本回归模型。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
Stata Journal
Stata Journal 数学-统计学与概率论
CiteScore
7.80
自引率
4.20%
发文量
44
审稿时长
>12 weeks
期刊介绍: The Stata Journal is a quarterly publication containing articles about statistics, data analysis, teaching methods, and effective use of Stata''s language. The Stata Journal publishes reviewed papers together with shorter notes and comments, regular columns, book reviews, and other material of interest to researchers applying statistics in a variety of disciplines.
期刊最新文献
Cluster randomized controlled trial analysis at the cluster level: The clan command. mpitb: A toolbox for multidimensional poverty indices Iterative intercensal single-decrement life tables using Stata Facilities for optimizing and designing multiarm multistage (MAMS) randomized controlled trials with binary outcomes hdps: A suite of commands for applying high-dimensional propensity-score approaches
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1