Stata JournalPub Date : 2022-06-01DOI: 10.1177/1536867X221106373
Daniele Spinelli
{"title":"Fitting spatial autoregressive logit and probit models using Stata: The spatbinary command","authors":"Daniele Spinelli","doi":"10.1177/1536867X221106373","DOIUrl":"https://doi.org/10.1177/1536867X221106373","url":null,"abstract":"Starting from version 15, Stata allows users to manage data and fit regressions accounting for spatial relationships through the sp commands. Spatial regressions can be estimated using the spregress, spxtregress, and spivregress commands. These commands allow users to fit spatial autoregressive models in cross-sectional and panel data. However, they are designed to estimate regressions with continuous dependent variables. Although binary spatial regressions are important in applied econometrics, they cannot be estimated in Stata. Therefore, I introduce spatbinary, a Stata command that allows users to fit spatial logit and probit models.","PeriodicalId":51171,"journal":{"name":"Stata Journal","volume":null,"pages":null},"PeriodicalIF":4.8,"publicationDate":"2022-06-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"65524935","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":2,"RegionCategory":"数学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Stata JournalPub Date : 2022-06-01DOI: 10.1177/1536867X221106403
Christopher F. Baum, S. Hurn, Jesús Otero
{"title":"Testing for time-varying Granger causality","authors":"Christopher F. Baum, S. Hurn, Jesús Otero","doi":"10.1177/1536867X221106403","DOIUrl":"https://doi.org/10.1177/1536867X221106403","url":null,"abstract":"The concept of Granger causality is an important tool in applied macroeconomics. Recently, recursive econometric methods have been developed to analyze the temporal stability of Granger-causal relationships. This article offers an implementation of these recursive procedures in Stata. An empirical example illustrates their use in analyzing the temporal stability of Granger causality among key U.S. macroeconomic series.","PeriodicalId":51171,"journal":{"name":"Stata Journal","volume":null,"pages":null},"PeriodicalIF":4.8,"publicationDate":"2022-06-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"42172050","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":2,"RegionCategory":"数学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Stata JournalPub Date : 2022-06-01DOI: 10.1177/1536867X221106404
David M. Kaplan
{"title":"Smoothed instrumental variables quantile regression","authors":"David M. Kaplan","doi":"10.1177/1536867X221106404","DOIUrl":"https://doi.org/10.1177/1536867X221106404","url":null,"abstract":"In this article, I introduce the sivqr command, which estimates the coefficients of the instrumental variables quantile regression model introduced by Chernozhukov and Hansen (2005, Econometrica 73: 245–261). The sivqr command offers several advantages over the existing ivqreg and ivqreg2 commands for estimating this instrumental variables quantile regression model, which complements the alternative “triangular model” behind cqiv and the “local quantile treatment effect” model of ivqte. Computationally, sivqr implements the smoothed estimator of Kaplan and Sun (2017, Econometric Theory 33: 105–157), who show that smoothing improves both computation time and statistical accuracy. Standard errors are computed analytically or by Bayesian bootstrap; for nonindependent and identically distributed sampling, sivqr is compatible with bootstrap. I discuss syntax and the underlying methodology, and I compare sivqr with other commands in an example.","PeriodicalId":51171,"journal":{"name":"Stata Journal","volume":null,"pages":null},"PeriodicalIF":4.8,"publicationDate":"2022-06-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"43501561","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":2,"RegionCategory":"数学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Stata JournalPub Date : 2022-06-01DOI: 10.1177/1536867X221106402
Yuya Sasaki, T. Ura
{"title":"Average treatment effect estimates robust to the “limited overlap” problem: robustate","authors":"Yuya Sasaki, T. Ura","doi":"10.1177/1536867X221106402","DOIUrl":"https://doi.org/10.1177/1536867X221106402","url":null,"abstract":"We introduce a new command, robustate, that executes the inverseprobability weighting estimation and inference for the average treatment effect with robustness against limited overlap (that is, weak satisfaction of the common support condition). This command produces estimates, standard errors, p-values, and confidence intervals for the average treatment effect. The utility of the command is demonstrated with both simulated and real data of right heart catheterization. These illustrations show that the proposed estimator implemented by the robustate command indeed exhibits more robustness against limited overlap than the traditional inverse-probability weighting estimator. The main method of the command is proposed in Sasaki and Ura (2022, Econometric Theory 38: 66–112).","PeriodicalId":51171,"journal":{"name":"Stata Journal","volume":null,"pages":null},"PeriodicalIF":4.8,"publicationDate":"2022-06-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"42129493","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":2,"RegionCategory":"数学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Stata JournalPub Date : 2022-06-01DOI: 10.1177/1536867X221106417
N. Bruun
{"title":"Interactively building table reports with basetable","authors":"N. Bruun","doi":"10.1177/1536867X221106417","DOIUrl":"https://doi.org/10.1177/1536867X221106417","url":null,"abstract":"In statistical work, it is essential to have an overview of the data used. In, for example, biomedical articles, a standardized way of reporting summaries of continuous and categorical variables is “table 1”. This standardized way of reporting can be useful in most cases of statistical work. The basetable command is a flexible and straightforward way to build and format such table reports. The final reports are easy to style into Stata Markup and Control Language, commaseparated values, HyperText Markup Language, LATEX or TEX, or Markdown and, for example, save into a file specified by the using modifier. Also, it is possible to export the reports created by basetable into Excel worksheets. Because of the General Data Protection Regulation, it has become necessary to blur information on individuals when making reports; in basetable, there are options to blur both categorical and continuous data.","PeriodicalId":51171,"journal":{"name":"Stata Journal","volume":null,"pages":null},"PeriodicalIF":4.8,"publicationDate":"2022-06-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"44163080","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":2,"RegionCategory":"数学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Stata JournalPub Date : 2022-06-01DOI: 10.1177/1536867X221106416
Patricio Troncoso, Ana Morales-Gómez
{"title":"Estimating the complier average causal effect via a latent class approach using gsem","authors":"Patricio Troncoso, Ana Morales-Gómez","doi":"10.1177/1536867X221106416","DOIUrl":"https://doi.org/10.1177/1536867X221106416","url":null,"abstract":"In randomized controlled trials, intention-to-treat analysis is customarily used to estimate the effect of the trial. However, in the presence of noncompliance, this can often lead to biased estimates because intention-to-treat analysis completely ignores varying levels of actual treatment received. This is a known issue that can be overcome by adopting the complier average causal effect approach, which estimates the effect the trial had on the individuals who complied with the protocol. When compliance is unobserved in the control group, the complier average causal effect estimate can be obtained via a latent class specification using the gsem command.","PeriodicalId":51171,"journal":{"name":"Stata Journal","volume":null,"pages":null},"PeriodicalIF":4.8,"publicationDate":"2022-06-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"47745915","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":2,"RegionCategory":"数学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Stata JournalPub Date : 2022-06-01DOI: 10.1177/1536867X221106437
M. Falcaro, R. Newson, P. Sasieni
{"title":"Stata tip 146: Using margins after a Poisson regression model to estimate the number of events prevented by an intervention","authors":"M. Falcaro, R. Newson, P. Sasieni","doi":"10.1177/1536867X221106437","DOIUrl":"https://doi.org/10.1177/1536867X221106437","url":null,"abstract":"After fitting a Poisson regression model to evaluate the effect of an intervention in a cohort study, one might be interested in estimating the number of events prevented by the intervention (assuming the observed associations are causal). This can be derived as the difference in the intervention group between the predicted number of events under the counterfactual (no intervention) and the factual (intervention) scenarios. One could use the predict command to obtain the predicted number of events under the two scenarios and then sum up the differences, but this approach would not be conve-nient for several reasons. One would need to change the intervention variable to get the counterfactual predicted values, and the confidence intervals would not be readily available ( bootstrap or jackknife could be used, but this could be particularly time consuming if the dataset is large). We here suggest the margins command. Its use, however, is not straight-forward for our specific problem margins computes observation then the these","PeriodicalId":51171,"journal":{"name":"Stata Journal","volume":null,"pages":null},"PeriodicalIF":4.8,"publicationDate":"2022-06-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"46715682","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":2,"RegionCategory":"数学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Stata JournalPub Date : 2022-06-01DOI: 10.1177/1536867X221106436
N. Cox
{"title":"Speaking Stata: The largest five—A tale of tail values","authors":"N. Cox","doi":"10.1177/1536867X221106436","DOIUrl":"https://doi.org/10.1177/1536867X221106436","url":null,"abstract":"How do you work with the largest five, or smallest five, or any other fixed number of values in a tail of a distribution? In this column, I give examples of problems and code for basic calculations as a prelude to graphics, tables, and more detailed analysis. The main illustration is analysis of concentration among firms or companies, with wider discussion mentioning hydrology, climatology, cryptography, and ecology. The examples allow a tutorial covering sorting and ranking and using if and in to select observations, by: as a framework for groupwise calculations, indicator variables as a mode of selection, and egen as a Swiss Army knife with many handy functions.","PeriodicalId":51171,"journal":{"name":"Stata Journal","volume":null,"pages":null},"PeriodicalIF":4.8,"publicationDate":"2022-06-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"45542509","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":2,"RegionCategory":"数学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Stata JournalPub Date : 2022-06-01DOI: 10.1177/1536867x221106438
N. Cox
{"title":"Erratum: Stata tip 145: Numbering weeks within months","authors":"N. Cox","doi":"10.1177/1536867x221106438","DOIUrl":"https://doi.org/10.1177/1536867x221106438","url":null,"abstract":"","PeriodicalId":51171,"journal":{"name":"Stata Journal","volume":null,"pages":null},"PeriodicalIF":4.8,"publicationDate":"2022-06-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"45999549","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":2,"RegionCategory":"数学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}