Template-Type: ReDIF-Article 1.0 Author-Name: Ariel Linden Author-Workplace-Name: Linden Consulting Group Author-Email: alinden@lindenconsulting.org Author-Person: pli1113 Author-Name: Chuck Huber Author-Workplace-Name: StataCorp Author-Email: chuber@stata.com Author-Name: Geoffrey T. Wodtke Author-Workplace-Name: University of Chicago Author-Email: wodtke@uchicago.edu Title: A regression-with-residuals method for analyzing causal mediation: The rwrmed package Journal: Stata Journal Pages: 559-574 Issue: 3 Volume: 21 Year: 2021 Month: September Abstract: In this article, we introduce the rwrmed package, which performs mediation analysis using the methods proposed by Wodtke and Zhou (2020, Epi- demiology 31: 369–375). Specifically, rwrmed estimates interventional direct and indirect effects in the presence of treatment-induced confounding by fitting models for 1) the conditional mean of the mediator given the treatment and a set of base- line confounders and 2) the conditional mean of the outcome given the treatment, mediator, baseline confounders, and a set of treatment-induced confounders that have been residualized with respect to the observed past. Interventional direct and indirect effects are simple functions of the parameters in these models when they are correctly specified and when there are no unobserved variables that confound the treatment-outcome, treatment-mediator, or mediator-outcome relationships. When no treatment-induced confounders are specified, rwrmed produces natural direct and indirect effect estimates. Keywords: rwrmed, mediation, effect decomposition, causal inference, confounding File-URL: http://www.stata-journal.com/article.html?article=st0646 File-Function: link to article purchase X-DOI: 10.1177/1536867X211045511 Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj21-3/st0646/ Handle:RePEc:tsj:stataj:v:21:y:2021:i:3:p:559-574 Template-Type: ReDIF-Article 1.0 Author-Name: Stephen Nash Author-Workplace-Name: London School of Hygiene and Tropical Medicine Author-Email: stevienashaa@gmail.com Author-Name: Katy E. Morgan Author-Workplace-Name: London School of Hygiene and Tropical Medicine Author-Email: katy.morgan@lshtm.ac.uk Author-Name: Chris Frost Author-Workplace-Name: London School of Hygiene and Tropical Medicine Author-Email: chris.frost@lshtm.ac.uk Author-Name: Amy Mulick Author-Workplace-Name: London School of Hygiene and Tropical Medicine Author-Email: amy.mulick@lshtm.ac.uk Title: Power and sample-size calculations for trials that compare slopes over time: Introducing the slopepower command Journal: Stata Journal Pages: 575-601 Issue: 3 Volume: 21 Year: 2021 Month: September Abstract: Trials of interventions that aim to slow disease progression may analyze a continuous outcome by comparing its change over time—its slope—between the treated and the untreated group using a linear mixed model. To perform a sample-size calculation for such a trial, one must have estimates of the parameters that govern the between- and within-subject variability in the outcome, which are often unknown. The algebra needed for the sample-size calculation can also be complex for such trial designs. We have written a new user-friendly command, slopepower, that performs sample-size or power calculations for trials that com- pare slope outcomes. The package is based on linear mixed-model methodology, described for this setting by Frost, Kenward, and Fox (2008, Statistics in Medicine 27: 3717–3731). In the first stage of this approach, slopepower obtains estimates of mean slopes together with variances and covariances from a linear mixed model fit to previously collected user-supplied data. In the second stage, these estimates are combined with user input about the target effectiveness of the treatment and design of the future trial to give an estimate of either a sample size or a statistical power. In this article, we present the slopepower command, briefly explain the methodology behind it, and demonstrate how it can be used to help plan a trial and compare the sample sizes needed for different trial designs. Keywords: slopepower, power, sample-size calculations, slopes, parallel-arm trial File-URL: http://www.stata-journal.com/article.html?article=st0647 File-Function: link to article purchase X-DOI: 10.1177/1536867X211045512 Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj21-3/st0647/ Handle:RePEc:tsj:stataj:v:21:y:2021:i:3:p:575-601 Template-Type: ReDIF-Article 1.0 Author-Name: Martin Biewen Author-Workplace-Name: University of Tübingen Author-Email: martin.biewen@uni-tuebingen.de Author-Person: pbi40 Author-Name: Pascal Erhardt Author-Workplace-Name: University of Tübingen Author-Email: pascal.erhardt@uni-tuebingen.de Title: arhomme: An implementation of the Arellano and Bonhomme (2017) estimator for quantile regression with selection correction Journal: Stata Journal Pages: 602-625 Issue: 3 Volume: 21 Year: 2021 Month: September Abstract: Despite constituting a major theoretical breakthrough, the quantile selection model of Arellano and Bonhomme (2017, Econometrica 85: 1–28) based on copulas has not found its way into many empirical applications. We introduce the command arhomme, which implements different variants of the estimator along with standard errors based on bootstrapping and subsampling. We illustrate the command by replicating parts of the empirical application in the original article and a related application in Arellano and Bonhomme (2018, Handbook of Quantile Regression, chap. 13). Keywords: arhomme, Arellano and Bonhomme quantile selection model, quantile regression, selection correction, inequality, distribution File-URL: http://www.stata-journal.com/article.html?article=st0648 File-Function: link to article purchase X-DOI: 10.1177/1536867X211045516 Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj21-3/st0648/ Handle:RePEc:tsj:stataj:v:21:y:2021:i:3:p:602-625 Template-Type: ReDIF-Article 1.0 Author-Name: Álvaro A. Gutiérrez-Vargas Author-Workplace-Name: KU Leuven Author-Email: alvaro.gutierrezvargas@kuleuven.be Author-Name: Michel Meulders Author-Workplace-Name: KU Leuven Author-Email: michel.meulders@kuleuven.be Author-Name: Martina Vandebroek Author-Workplace-Name: KU Leuven Author-Email: martina.vandebroek@kuleuven.be Title: randregret: A command for fitting random regret minimization models using Stata Journal: Stata Journal Pages: 626-658 Issue: 3 Volume: 21 Year: 2021 Month: September Abstract: In this article, we describe the randregret command, which imple- ments a variety of random regret minimization (RRM) models. The command allows the user to apply the classic RRM model introduced in Chorus (2010, Eu- ropean Journal of Transport and Infrastructure Research 10: 181–196), the gen- eralized RRM model introduced in Chorus (2014, Transportation Research, Part B 68: 224–238), and also the μRRM and pure RRM models, both introduced in van Cranenburgh, Guevara, and Chorus (2015, Transportation Research, Part A 74: 91–109). We illustrate the use of the randregret command by using stated choice data on route preferences. The command offers robust and cluster standard- error correction using analytical expressions of the score functions. It also offers likelihood-ratio tests that can be used to assess the relevance of a given model spec- ification. Finally, users can obtain the predicted probabilities from each model by using the randregretpred command. Keywords: randregret, randregret_pure, randregretpred, discrete choice models, semicompensatory behavior, random utility maximization, random regret minimization File-URL: http://www.stata-journal.com/article.html?article=st0649 File-Function: link to article purchase X-DOI: 10.1177/1536867X211045538 Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj21-3/st0649/ Handle:RePEc:tsj:stataj:v:21:y:2021:i:3:p:626-658 Template-Type: ReDIF-Article 1.0 Author-Name: Sebastian Kripfganz Author-Workplace-Name: University of Exeter Author-Email: S.Kripfganz@exeter.ac.uk Author-Person: pkr246 Author-Name: Vasilis Sarafidis Author-Workplace-Name: BI Norwegian Business School Author-Email: vasilis.sarafidis@bi.no Author-Person: psa786 Title: Instrumental-variable estimation of large-T panel-data models with common factors Journal: Stata Journal Pages: 659-686 Issue: 3 Volume: 21 Year: 2021 Month: September Abstract: In this article, we introduce the xtivdfreg command, which implements a general instrumental-variables (IV) approach for fitting panel-data models with many time-series observations, T, and unobserved common factors or interactive effects, as developed by Norkute et al. (2021, Journal of Econometrics 220: 416–446) and Cui et al. (2020a, ISER Discussion Paper 1101). The underlying idea of this approach is to project out the common factors from exogenous covariates using principal-components analysis and to run IV regression in both of two stages, using defactored covariates as instruments. The resulting two-stage IV estimator is valid for models with homogeneous or heterogeneous slope coefficients and has several advantages relative to existing popular approaches. In addition, the xtivdfreg command extends the two-stage IV approach in two major ways. First, the algorithm accommodates estimation of unbalanced panels. Second, the algorithm permits a flexible specification of instruments. We show that when one imposes zero factors, the xtivdfreg command can replicate the results of the popular Stata ivregress command. Notably, unlike ivregress, xtivdfreg permits estimation of the two-way error-components panel-data model with heterogeneous slope coefficients. Keywords: xtivdfreg, xtivdfreg postestimation, large-T panels, two-stage instrumental-variable estimation, common factors, interactive effects, defactoring, cross-sectional dependence, two-way error-components panel-data model, heterogeneous slope coefficients File-URL: http://www.stata-journal.com/article.html?article=st0650 File-Function: link to article purchase X-DOI: 10.1177/1536867X211045558 Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj21-3/st0650/ Handle:RePEc:tsj:stataj:v:21:y:2021:i:3:p:659-686 Template-Type: ReDIF-Article 1.0 Author-Name: Jan Ditzen Author-Workplace-Name: Free University of Bozen-Bolzano Author-Email: jan.ditzen@unibz.it Author-Person: pdi434 Title: Estimating long-run effects and the exponent of cross-sectional dependence: An update to xtdcce2 Journal: Stata Journal Pages: 687-707 Issue: 3 Volume: 21 Year: 2021 Month: September Abstract: In this article, I describe several updates to xtdcce2 (Ditzen, 2018, Stata Journal 18: 585–617). First, I explain how to estimate long-run effects in models with cross-sectional dependence. I review three methods to estimate the long-run effects and discuss their implementation into Stata using xtdcce2. Two of the estimation methods build on Chudik et al. (2016, Advances in Econometrics: Vol. 36—Essays in Honor of Aman Ullah, 85–135): the cross-sectionally augmented distributed lag and the cross-sectionally augmented autoregressive distributed lag estimator. As a third alternative, I review an error-correction model in the presence of cross-sectional dependence. Second, I explain how to estimate the exponent of cross-sectional dependence using xtcse2 following Bailey, Kapetanios, and Pesaran (2016, Journal of Applied Econometrics 31: 929–960; 2019, Sankhyá 81: 46–102). Keywords: xtdcce2, xtcse2, xtcd2, parameter heterogeneity, dynamic panels, cross-section dependence, common-correlated effects, pooled mean-group estimator, mean-group estimator, error-correction model, ardl, long-run coefficients File-URL: http://www.stata-journal.com/article.html?article=st0536_1 File-Function: link to article purchase X-DOI: 10.1177/1536867X211045560 Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj21-3/st0536_1/ Handle:RePEc:tsj:stataj:v:21:y:2021:i:3:p:687-707 Template-Type: ReDIF-Article 1.0 Author-Name: Federico Belotti Author-Workplace-Name: University of Rome Tor Vergata Author-Email: federico.belotti@uniroma2.it Author-Person: pbe427 Author-Name: Alessandro Borin Author-Workplace-Name: Bank of Italy Author-Email: alessandro.borin@bancaditalia.it Author-Person: Author-Name: Michele Mancini Author-Workplace-Name: Bank of Italy Author-Email: michele.mancini@bancaditalia.it Author-Person: pma2251 Title: icio: Economic analysis with intercountry input–output tables Journal: Stata Journal Pages: 708-755 Issue: 3 Volume: 21 Year: 2021 Month: September Abstract: Several new statistical tools and analytical frameworks have been recently developed to measure countries’ and sectors’ involvement in global value chains. Such a wealth of methodologies reflects the fact that different empirical questions call for distinct accounting methods and different levels of aggregation of trade flows. In this article, we describe icio, a new command for the computation of the most appropriate measures of trade in value added as well as participation in global value chains. icio follows the conceptual framework proposed by Borin and Mancini (2019, Policy Research Working Paper WPS 8804; WDR 2020 Background Paper, World Bank Group), which in turn extends, refines, and reconciles the other main contributions in this strand of the literature. icio is flexible enough to work with any intercountry input–output table and with any level of aggregation of trade flows. Keywords: icio, global value chains, input–output tables, trade in value added File-URL: http://www.stata-journal.com/article.html?article=st0651 File-Function: link to article purchase X-DOI: 10.1177/1536867X211045573 Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj21-3/st0651/ Handle:RePEc:tsj:stataj:v:21:y:2021:i:3:p:708-755 Template-Type: ReDIF-Article 1.0 Author-Name: Andres Yi Chang Author-Workplace-Name: World Bank Group Author-Email: andresyichang@gmail.com Title: Test scores’ robustness to scaling: The scale_transformation command Journal: Stata Journal Pages: 756-771 Issue: 3 Volume: 21 Year: 2021 Month: September Abstract: Social scientists frequently rely on the cardinal comparability of test scores to assess achievement gaps between population subgroups and their evolu- tion over time. This approach has been criticized because of the ordinal nature of test scores and the sensitivity of results to order-preserving transformations that are theoretically plausible. Bond and Lang (2013, Review of Economics and Statistics 95: 1468–1479) document the sensitivity of measured ability to scaling choices and develop a method to assess the robustness of changes in ability over time to scaling choices. In this article, I present the scale_transformation com- mand, which expands the Bond and Lang (2013) method to more general cases and optimizes their algorithm to work with large datasets. The command assesses the robustness of an achievement gap between two subgroups to any arbitrary choice of scale by finding bounds for the original gap estimation. Additionally, it finds scale transformations that are very likely and unlikely to benchmark against the results obtained. Finally, it also allows the user to measure how much gap growth coefficients change when including controls in their specifications. Keywords: scale_transformation, test scores, measurement, achievement gaps, robustness to scaling, psychometrics File-URL: http://www.stata-journal.com/article.html?article=st0652 File-Function: link to article purchase X-DOI: 10.1177/1536867X211045574 Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj21-3/st0652/ Handle:RePEc:tsj:stataj:v:21:y:2021:i:3:p:756-771 Template-Type: ReDIF-Article 1.0 Author-Name: Sebastian Kripfganz Author-Workplace-Name: University of Exeter Author-Email: S.Kripfganz@exeter.ac.uk Author-Person: pkr246 Author-Name: Jan F. Kiviet Author-Workplace-Name: University of Amsterdam Author-Email: j.f.kiviet@uva.nl Author-Person: pki2 Title: kinkyreg: Instrument-free inference for linear regression models with endogenous regressors Journal: Stata Journal Pages: 772-813 Issue: 3 Volume: 21 Year: 2021 Month: September Abstract: In models with endogenous regressors, a standard regression approach is to exploit just-identifying or overidentifying orthogonality conditions by using instrumental variables. In just-identified models, the identifying orthogonality as- sumptions cannot be tested without the imposition of other nontestable assump- tions. While formal testing of overidentifying restrictions is possible, its interpre- tation still hinges on the validity of an initial set of untestable just-identifying or- thogonality conditions. We present the kinkyreg command for kinky least-squares inference, which adopts an alternative approach to identification. By exploiting nonorthogonality conditions in the form of bounds on the admissible degree of endogeneity, feasible test procedures can be constructed that do not require in- strumental variables. The kinky least-squares confidence bands can be more infor- mative than confidence intervals obtained from instrumental-variables estimation, especially when the instruments are weak. Moreover, the approach facilitates a sensitivity analysis for standard instrumental-variables inference. In particular, it allows the user to assess the validity of previously untestable just-identifying exclusion restrictions. Further instrument-free tests include linear hypotheses, functional form, heteroskedasticity, and serial correlation tests. Keywords: kinkyreg, kinkyreg2dta, kinkyreg postestimation, kinky least-squares, instrumental variables, instrument-free tests, endogenous regressors, confidence intervals, sensitivity analysis, specification tests, heteroskedasticity, serial correlation, exclusion restrictions, RESET, relative correlation restriction, Krauth’s lambda, Oster’s delta, graphical inference File-URL: http://www.stata-journal.com/article.html?article=st0653 File-Function: link to article purchase X-DOI: 10.1177/1536867X211045575 Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj21-3/st0653/ Handle:RePEc:tsj:stataj:v:21:y:2021:i:3:p:772-813 Template-Type: ReDIF-Article 1.0 Author-Name: William D. Dupont Author-Workplace-Name: Vanderbilt University School of Medicine Author-Email: william.dupont@vumc.org Author-Person: pdu42 Title: Review of Michael N. Mitchell’s Data Management Using Stata: A Practical Handbook, Second Edition Journal: Stata Journal Pages: 814-817 Issue: 3 Volume: 21 Year: 2021 Month: September Abstract: In this article, I review Data Management Using Stata: A Practical Handbook, Second Edition, by Michael N. Mitchell (2020, Stata Press). Keywords: book review, data management File-URL: http://www.stata-journal.com/article.html?article=gn0087 File-Function: link to article purchase X-DOI: 10.1177/1536867X211045581 Handle:RePEc:tsj:stataj:v:21:y:2021:i:3:p:814-817 Template-Type: ReDIF-Article 1.0 Author-Name: Nicholas J. Cox Author-Workplace-Name: Durham University Author-Email: n.j.cox@durham.ac.uk Author-Person: pco34 Title: Speaking Stata: Ordering or ranking groups of observations Journal: Stata Journal Pages: 818-837 Issue: 3 Volume: 21 Year: 2021 Month: September Abstract: Results for categorical variables may often be clearer if those variables are reordered or reranked, say, according to some measure of absolute or relative frequency or according to summaries of some other variable. Some graphical and tabulation commands have dedicated options serving that end. Otherwise, in practice a new order is often best achieved by creating a new variable holding the desired order using one or another egen function. There is usually a need to preserve the information in existing values or value labels and to watch out for ties. There may be a desire to reverse the direction of ranking from the default. I discuss procedures for datasets based on aggregate frequencies and for datasets based on individuals and introduce a new convenience command, myaxis, that handles many cases directly. Keywords: myaxis, ordering, ranking, graphics, tabulation, categorical data, geometric means, confidence intervals, egen File-URL: http://www.stata-journal.com/article.html?article=st0654 File-Function: link to article purchase X-DOI: 10.1177/1536867X211045582 Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj21-3/st0654/ Handle:RePEc:tsj:stataj:v:21:y:2021:i:3:p:818-837 Template-Type: ReDIF-Article 1.0 Author-Name: Nicholas J. Cox Author-Workplace-Name: Durham University Author-Email: n.j.cox@durham.ac.uk Author-Person: pco34 Title: Stata tip 141: Adding marginal spike histograms to quantile and cumulative distribution plots Journal: Stata Journal Pages: 838-846 Issue: 3 Volume: 21 Year: 2021 Month: September File-URL: http://www.stata-journal.com/article.html?article=gr0088 File-Function: link to article purchase X-DOI: 10.1177/1536867X211045583 Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj21-3/st0654/ Handle:RePEc:tsj:stataj:v:21:y:2021:i:3:p:838-846 Template-Type: ReDIF-Article 1.0 Author-Name: Editors Author-Email: editors@stata.com Title: Software updates Journal: Stata Journal Pages: 847 Issue: 3 Volume: 21 Year: 2021 Month: September Abstract: Updates for previously published packages are provided. Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj21-3/pr0041_4/ Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj21-3/st0389_7/ Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj21-3/st0534_2/ Handle:RePEc:tsj:stataj:v:21:y:2021:i:3:p:847