{"title":"Ordinary least squares and instrumental-variables estimators for any outcome and heterogeneity","authors":"Myoung-jae Lee, Chirok Han","doi":"10.1177/1536867x241233645","DOIUrl":"https://doi.org/10.1177/1536867x241233645","url":null,"abstract":"Given an exogenous treatment d and covariates x, an ordinary least-squares (OLS) estimator is often applied with a noncontinuous outcome y to find the effect of d, despite the fact that the OLS linear model is invalid. Also, when d is endogenous with an instrument z, an instrumental-variables estimator (IVE) is often applied, again despite the invalid linear model. Furthermore, the treatment effect is likely to be heterogeneous, say, µ<jats:sub>1</jats:sub>(x), not a constant as assumed in most linear models. Given these problems, the question is then what kind of effect the OLS and IVE actually estimate. Under some restrictive conditions such as a “saturated model”, the estimated effect is known to be a weighted average, say, E{ ω(x) µ<jats:sub>1</jats:sub>(x)}, but in general, OLS and the IVE applied to linear models with a noncontinuous outcome or heterogeneous effect fail to yield a weighted average of heterogeneous treatment effects. Recently, however, it has been found that E{ ω(x) µ<jats:sub>1</jats:sub>(x)} can be estimated by OLS and the IVE without those restrictive conditions if the “propensity-score residual” d − E( d| x) or the “instrument-score residual” z−E( z| x) is used. In this article, we review this recent development and provide a command for OLS and the IVE with the propensity- and instrument-score residuals, which are applicable to any outcome and any heterogeneous effect.","PeriodicalId":501101,"journal":{"name":"The Stata Journal: Promoting communications on statistics and Stata","volume":"143 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2024-03-19","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"140166325","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Luca Fumarco, S. Michael Gaddis, Francesco Sarracino, Iain Snoddy
{"title":"sendemails: An automated email package with multiple applications","authors":"Luca Fumarco, S. Michael Gaddis, Francesco Sarracino, Iain Snoddy","doi":"10.1177/1536867x241233672","DOIUrl":"https://doi.org/10.1177/1536867x241233672","url":null,"abstract":"In this article, we illustrate the sendemails command, which allows users to automatically send emails with Stata through PowerShell. Researchers can use this package to perform several email tasks, such as contacting students or colleagues with standardized messages. Additionally, researchers can perform more complex tasks that entail sending randomized messages with multiple attachments from multiple accounts; these tasks are often necessary to conduct correspondence audit tests. This article introduces the sendemails command and illustrates multiple examples of its application. The online appendix discusses an application of this package to correspondence audits.","PeriodicalId":501101,"journal":{"name":"The Stata Journal: Promoting communications on statistics and Stata","volume":"21 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2024-03-19","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"140166318","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"Nearly collinear robust procedures for 2SLS estimation","authors":"Alwyn Young","doi":"10.1177/1536867x241233668","DOIUrl":"https://doi.org/10.1177/1536867x241233668","url":null,"abstract":"Stata’s two-stage least-squares (2SLS) computation procedures are sensitive to near collinearity among regressors, allowing situations in which reported results depend upon factors as irrelevant as the order of the data and variables. This article illustrates this claim with the public-use data of Oreopoulos (2006, American Economic Review 96: 152–175), where the instrumented coefficient estimate can be made to vary between 0.012 and 30.0 in one specification by permuting the order of the variables. Different methods for improving the accuracy of 2SLS estimates are reviewed, and a Stata command for collinearity-robust 2SLS estimation is provided.","PeriodicalId":501101,"journal":{"name":"The Stata Journal: Promoting communications on statistics and Stata","volume":"19 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2024-03-19","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"140166307","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"Announcement of the Stata Journal Editors’ Prize 2024","authors":"Nicholas J. Cox, Stephen P. Jenkins","doi":"10.1177/1536867x241233638","DOIUrl":"https://doi.org/10.1177/1536867x241233638","url":null,"abstract":"","PeriodicalId":501101,"journal":{"name":"The Stata Journal: Promoting communications on statistics and Stata","volume":"18 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2024-03-19","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"140166544","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"Identify latent group structures in panel data: The classifylasso command","authors":"Wenxin Huang, Yiru Wang, Lingyun Zhou","doi":"10.1177/1536867x241233642","DOIUrl":"https://doi.org/10.1177/1536867x241233642","url":null,"abstract":"In this article, we introduce a new command, classifylasso, that implements the classifier-lasso method (Su, Shi, and Phillips, 2016, Econometrica 84: 2215–2264) to simultaneously identify and estimate unobserved parameter heterogeneity in panel-data models using penalized techniques. We document the functionality of this command, including 1) penalized least-squares estimation of group-specific coefficients and classification of unknown group membership under a certain number of groups; 2) two lasso-type estimators with robust standard errors, namely, classifier-lasso and postlasso; and 3) determination of the number of groups based on an information criterion. We further develop some postestimation commands to display and visualize the estimation results.","PeriodicalId":501101,"journal":{"name":"The Stata Journal: Promoting communications on statistics and Stata","volume":"25 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2024-03-19","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"140166333","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"Stata tip 154: Computing power and sample size for prospective diagnostic accuracy studies using Stata’s official power commands","authors":"Ariel Linden","doi":"10.1177/1536867x241233679","DOIUrl":"https://doi.org/10.1177/1536867x241233679","url":null,"abstract":"","PeriodicalId":501101,"journal":{"name":"The Stata Journal: Promoting communications on statistics and Stata","volume":"157 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2024-03-19","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"140166309","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
William J. Parish, Arnie Aldridge, Martijn van Hasselt
{"title":"A Bayesian method for addressing multinomial misclassification with applications for alcohol epidemiological modeling","authors":"William J. Parish, Arnie Aldridge, Martijn van Hasselt","doi":"10.1177/1536867x241233671","DOIUrl":"https://doi.org/10.1177/1536867x241233671","url":null,"abstract":"In this article, we describe a new command, bamm, that implements a Bayesian method for addressing misclassification in multinomial data; see Swartz et al. (2004, Canadian Journal of Statistics 32: 285–302). We also describe a postestimation command, bammdx, that was developed to provide additional estimation diagnostics. We describe the method and the new commands and then present results from both a simulation study demonstrating bamm’s performance under a known misclassification data-generating process and an empirical example from alcohol epidemiology modeling.","PeriodicalId":501101,"journal":{"name":"The Stata Journal: Promoting communications on statistics and Stata","volume":"6 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2024-03-19","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"140166690","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"Browse and cite Stata manuals easily: The wwwhelp command","authors":"Yongli Chen, Yujun Lian","doi":"10.1177/1536867x241233676","DOIUrl":"https://doi.org/10.1177/1536867x241233676","url":null,"abstract":"In this article, we describe a new command, wwwhelp, that facilitates direct access to online versions of Stata’s official help files or PDF documentation. Addressing the challenges associated with storing, citing, and sharing documentation, wwwhelp complements the help command by enabling access to documentation outside the Stata environment. In addition to fully using the abundant resources available on Stata’s website, wwwhelp enhances the convenience of citing Stata commands in articles and blog posts, thereby promoting the utilization and dissemination of Stata commands.","PeriodicalId":501101,"journal":{"name":"The Stata Journal: Promoting communications on statistics and Stata","volume":"51 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2024-03-19","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"140166317","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"Stata tip 153: Extracting text data from webpages","authors":"Andrew Musau","doi":"10.1177/1536867x241233678","DOIUrl":"https://doi.org/10.1177/1536867x241233678","url":null,"abstract":"","PeriodicalId":501101,"journal":{"name":"The Stata Journal: Promoting communications on statistics and Stata","volume":"41 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2024-03-19","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"140166311","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Achim Ahrens, Christian B. Hansen, Mark E. Schaffer, Thomas Wiemann
{"title":"ddml: Double/debiased machine learning in Stata","authors":"Achim Ahrens, Christian B. Hansen, Mark E. Schaffer, Thomas Wiemann","doi":"10.1177/1536867x241233641","DOIUrl":"https://doi.org/10.1177/1536867x241233641","url":null,"abstract":"In this article, we introduce a package, ddml, for double/debiased machine learning in Stata. Estimators of causal parameters for five different econometric models are supported, allowing for flexible estimation of causal effects of endogenous variables in settings with unknown functional forms or many exogenous variables. ddml is compatible with many existing supervised machine learning programs in Stata. We recommend using double/debiased machine learning in combination with stacking estimation, which combines multiple machine learners into a final predictor. We provide Monte Carlo evidence to support our recommendation.","PeriodicalId":501101,"journal":{"name":"The Stata Journal: Promoting communications on statistics and Stata","volume":"26 1","pages":""},"PeriodicalIF":0.0,"publicationDate":"2024-03-19","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"140166326","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}