Template-Type: ReDIF-Article 1.0 Author-Name: Kristoffer Bjärkefur Author-Workplace-Name: World Bank Group Author-Email: kbjarkefur@worldbank.org Author-Name: Luíza Cardoso de Andrade Author-Workplace-Name: University of Chicago Author-Email: luizaandrade@uchicago.edu Author-Name: Benjamin Daniels Author-Workplace-Name: Georgetown University Author-Email: benjamin.daniels@georgetown.edu Author-Person: pda505 Title: iefieldkit: Commands for primary data collection and cleaning (update) Journal: Stata Journal Pages: 875-883 Issue: 3 Volume: 23 Year: 2023 Month: September Abstract: Data collection and cleaning workflows implement highly repetitive but extremely important processes. In this article, we describe an update to iefieldkit, a package developed to standardize and simplify best practices for high-quality primary data collection across the World Bank’s Development Im- pact Evaluation department. The first release of iefieldkit provided workflows to automate error checking for Open Data Kit-based survey modules, duplicate management, data cleaning, and codebook creation. This update to the package includes improved commands to document and implement data point corrections, verify the structure or contents of data using codebooks, and create replication- ready data through automated variable subsetting. Keywords: iefieldkit, iecorrect, iecodebook, primary data collection, Open Data Kit, SurveyCTO, data cleaning, survey harmonization, duplicates, codebooks File-URL: http://www.stata-journal.com/article.html?article=dm0105_1 File-Function: link to article purchase X-DOI: 10.1177/1536867X231196496 Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj23-3/dm0105_1/ Handle:RePEc:tsj:stataj:v:23:y:2023:i:3:p:875-883 Template-Type: ReDIF-Article 1.0 Author-Name: Mark D. Chatfield Author-Workplace-Name: The University of Queensland Author-Email: m.chatfield@uq.edu.au Author-Name: Tim J. Cole Author-Workplace-Name: University College London Author-Name: Henrica C. W. de Vet Author-Workplace-Name: Amsterdam Medical Center Author-Name: Louise Marquart-Wilson Author-Workplace-Name: The University of Queensland Author-Name: Daniel M. Farewell Author-Workplace-Name: Cardiff University Title: blandaltman: A command to create variants of Bland–Altman plots Journal: Stata Journal Pages: 851-874 Issue: 3 Volume: 23 Year: 2023 Month: September Abstract: Bland–Altman plots can be useful in paired data settings such as measurement-method comparison studies. A Bland–Altman plot has differences, percentage differences, or ratios on the y axis and a mean of the data pairs on the x axis, with 95% limits of agreement indicating the central 95% range of differ- ences, percentage differences, or ratios. This range can vary with the mean. We introduce the community-contributed blandaltman command, which uniquely in Stata can 1) create Bland–Altman plots featuring ratios in addition to differences and percentage differences, 2) allow the limits of agreement for ratios and percent- age differences to vary as a function of the mean, and 3) add confidence intervals, prediction intervals, and tolerance intervals to the plots. Keywords: blandaltman, Bland–Altman plot, limits of agreement, agree- ment, baplot, batplot, concord, prediction, tolerance, interval, ratio, percentage difference File-URL: http://www.stata-journal.com/article.html?article=gr0094 File-Function: link to article purchase X-DOI: 10.1177/1536867X231196488 Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj23-3/gr0094/ Handle:RePEc:tsj:stataj:v:23:y:2023:i:3:p:851-874 Template-Type: ReDIF-Article 1.0 Author-Name: Babak Choodari-Oskooei Author-Workplace-Name: MRC Clinical Trials Unit at UCL Author-Email: b.choodari-oskooei@ucl.ac.uk Author-Name: Daniel J. Bratton Author-Workplace-Name: GlaxoSmithKline Author-Email: daniel.x.bratton@gsk.com Author-Name: Mahesh K. B. Parmar Author-Workplace-Name: MRC Clinical Trials Unit at UCL Author-Email: m.parmar@ucl.ac.uk Title: Facilities for optimizing and designing multiarm multistage (MAMS) randomized controlled trials with binary outcomes Journal: Stata Journal Pages: 774-798 Issue: 3 Volume: 23 Year: 2023 Month: September Abstract: We introduce two commands, nstagebin and nstagebinopt, that can be used to facilitate the design of multiarm multistage (MAMS) trials with binary outcomes. MAMS designs are a class of efficient and adaptive randomized clinical trials that have successfully been used in many disease areas, including cancer, tu- berculosis, maternal health, COVID-19, and surgery. The nstagebinopt command finds a class of efficient “admissible” designs based on an optimality criterion using a systematic search procedure. The nstagebin command calculates the stagewise sample sizes, trial timelines, and overall operating characteristics of MAMS designs with binary outcomes. Both commands allow the use of Dunnett’s correction to account for multiple testing. We also use the ROSSINI 2 MAMS design, an ongo- ing MAMS trial in surgical wound infection, to illustrate the capabilities of both commands. The new commands facilitate the design of MAMS trials with binary outcomes where more than one research question can be addressed under one protocol. Keywords: nstagebin, nstagebinopt, multiarm multistage, MAMS, family-wise type I error rate, FWER, α functions, adaptive designs File-URL: http://www.stata-journal.com/article.html?article=st0728 File-Function: link to article purchase X-DOI: 10.1177/1536867X231196295 Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj23-3/st0728/ Handle:RePEc:tsj:stataj:v:23:y:2023:i:3:p:774-798 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: Replacing missing values: The easiest problems Journal: Stata Journal Pages: 884-896 Issue: 3 Volume: 23 Year: 2023 Month: September Abstract: Missing values are common in real datasets, and what to do about them is a large and challenging question. This column focuses on the easiest problems in which a researcher is clear, or at least highly confident, about what missing values should be instead, implying a deterministic replacement. The main tricks are copying values from observation to observation and using the ipolate command. Both may often be extended simply to panel or longitudinal datasets or to other datasets with a group structure, such as data on individuals within families or households. This column includes how to satisfy constraints that interpolation is confined to filling gaps between values known to be equal or to observations moderately close to a known value in time or in some other sequence or position variable. Keywords: data management, missing values File-URL: http://www.stata-journal.com/article.html?article=dm0113 File-Function: link to article purchase DOI: 10.1177/1536867X231196519 Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj23-3/dm0113/ Handle:RePEc:tsj:stataj:v:23:y:2023:i:3:p:884-896 Template-Type: ReDIF-Article 1.0 Author-Name: John Gregson Author-Workplace-Name: London School of Hygiene and Tropical Medicine Author-Email: john.gregson@lshtm.ac.uk Author-Name: João Pedro Ferreira Author-Workplace-Name: Université de Lorraine Author-Name: Tim Collier Author-Workplace-Name: London School of Hygiene and Tropical Medicine Author-Email: tim.collier@lshtm.ac.uk Title: winratiotest: A command for implementing the win ratio and stratified win ratio in Stata Journal: Stata Journal Pages: 835-850 Issue: 3 Volume: 23 Year: 2023 Month: September Abstract: The win ratio is a statistical method most commonly used for analyzing composite outcomes in clinical trials. Composite outcomes comprise two or more distinct “component” events (for example, myocardial infarction or death) and are typically analyzed using time-to-first-event methods ignoring the relative importance of the component events. When using the win ratio, component events are instead placed into a hierarchy from most to least important; more important components can then be prioritized over less important outcomes (for example, death can be prioritized over myocardial infarction). Furthermore, the win ra- tio enables outcomes of different types (for example, time-to-event, continuous, binary, ordinal, and repeat events) to be combined. We present winratiotest, a command to implement the win-ratio approach for hierarchical outcomes in a flexible and user-friendly way. Keywords: winratiotest, win ratio, stratified win ratio, clinical trials, composite outcomes File-URL: http://www.stata-journal.com/article.html?article=st0730 File-Function: link to article purchase X-DOI: 10.1177/1536867X231196480 Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj23-3/st0730/ Handle:RePEc:tsj:stataj:v:23:y:2023:i:3:p:835-850 Template-Type: ReDIF-Article 1.0 Author-Name: Leonardo Grilli Author-Workplace-Name: University of Florence Author-Email: leonardo.grilli@unifi.it Author-Person: pgr200 Author-Name: Carla Rampichini Author-Workplace-Name: University of Florence Author-Email: carla.rampichini@unifi.it Author-Person: pra260 Title: Review of Multilevel and Longitudinal Modeling Using Stata, Fourth Edition, by Sophia Rabe-Hesketh and Anders Skrondal Journal: Stata Journal Pages: 901-904 Issue: 3 Volume: 23 Year: 2023 Month: September Abstract: This article reviews Multilevel and Longitudinal Modeling Using Stata, Fourth Edition, by Rabe-Hesketh and Skrondal (2022, Stata Press). Keywords: endogeneity, fixed effects, hierarchical data, mixed-effects model, random effects File-URL: http://www.stata-journal.com/article.html?article=gn0095 File-Function: link to article purchase X-DOI: 10.1177/1536867X231196518 Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj23-3/gn0095/ Handle:RePEc:tsj:stataj:v:23:y:2023:i:3:p:901-904 Template-Type: ReDIF-Article 1.0 Author-Name: Jerônimo Oliveira Muniz Author-Workplace-Name: Universidade Federal de Minas Gerais Author-Email: jeronimo@ufmg.br Title: Iterative intercensal single-decrement life tables using Stata Journal: Stata Journal Pages: 813-834 Issue: 3 Volume: 23 Year: 2023 Month: September Abstract: One way to estimate mortality in countries with incomplete data is to utilize intercensal methods, which do not require model life tables and provide accurate results even in the presence of age distortions and death underregistration. In this article, I revisit three of these techniques (census based, death distribution, and an iterative procedure) and introduce ilt, a command to calculate single- decrement life tables and the net flow of migrants by age. The required inputs are two age-specific population distributions and the average number of deaths between them. The empirical example draws on data from Vietnam, but the methods are extendable to any context and period. Keywords: ilt, age, demography, life expectancy, life table, iterative, intercensal, census File-URL: http://www.stata-journal.com/article.html?article=st0729 File-Function: link to article purchase X-DOI: 10.1177/1536867X231196441 Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj23-3/st0729/ Handle:RePEc:tsj:stataj:v:23:y:2023:i:3:p:813-834 Template-Type: ReDIF-Article 1.0 Author-Name: Roger B. Newson Author-Workplace-Name: King’s College London Author-Email: roger.newson@kcl.ac.uk Author-Person: pne37 Author-Name: Milena Falcaro Author-Workplace-Name: King’s College London Author-Email: milena.falcaro@kcl.ac.uk Title: Robit regression in Stata Journal: Stata Journal Pages: 658-682 Issue: 3 Volume: 23 Year: 2023 Month: September Abstract: Logistic and probit models are the most popular regression models for binary outcomes. A simple robust alternative is the robit model, which replaces the underlying normal distribution in the probit model with a Student’s t distribution. The heavier tails of the t distribution (compared with the normal distribution) mean that model outliers are less influential. Robit regression models can be fit as generalized linear models with the link function defined as the inverse cumulative t distribution function with a specified number of degrees of freedom; they have been advocated as being particularly suitable for estimating inverse-probability weights and propensity scoring more generally. Here we describe a new command, robit, that implements robit regression in Stata. Keywords: robit, xlink, robit regression, binary regression, generalized linear models, inverse-probability weights File-URL: http://www.stata-journal.com/article.html?article=st0724 File-Function: link to article purchase X-DOI: 10.1177/1536867X231195288 Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj23-3/st0724/ Handle:RePEc:tsj:stataj:v:23:y:2023:i:3:p:658-682 Template-Type: ReDIF-Article 1.0 Author-Name: Carlo Schwarz Author-Workplace-Name: Bocconi University Author-Email: carlo.schwarz@unibocconi.it Author-Person: psc921 Title: Estimating text regressions using txtreg_train Journal: Stata Journal Pages: 799-812 Issue: 3 Volume: 23 Year: 2023 Month: September 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 logis- tic regressions. The txtreg_predict command obtains the predictions from the trained text regression model. Furthermore, the txtreg_analyze command facil- itates 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. Keywords: txtreg_train, txtreg_predict, txtreg_analyze, text regressions, machine learning, text analysis File-URL: http://www.stata-journal.com/article.html?article=dm0112 File-Function: link to article purchase X-DOI: 110.1177/1536867X231196349 Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj23-3/dm0112/ Handle:RePEc:tsj:stataj:v:23:y:2023:i:3:p:779-812 Template-Type: ReDIF-Article 1.0 Author-Name: Nicolai Suppa Author-Workplace-Name: Autonomous University of Barcelona Author-Email: nsuppa@ced.uab.es Author-Person: psu382 Title: mpitb: A toolbox for multidimensional poverty indices Journal: Stata Journal Pages: 625-657 Issue: 3 Volume: 23 Year: 2023 Month: September Abstract: In this article, I present mpitb, a toolbox for multidimensional poverty indices (MPIs). The package mpitb comprises several subcommands to facilitate specification, estimation, and analyses of MPIs and supports the popular Alkire– Foster framework to multidimensional poverty measurement. mpitb offers several benefits to researchers, analysts, and practitioners working on MPIs, including substantial time savings (for example, because of lower data management and programming requirements) while allowing for a more comprehensive analysis at the same time. Aside from various convenience functions, mpitb also provides low-level tools for advanced users and programmers. Keywords: mpitb, mpitb assoc, mpitb ctyselect, mpitb estcot, mpitb est, mpitb gafvars, mpitb refsh, mpitb rframe, mpitb set, mpitb setwgts, mpitb show, mpitb stores, multidimensional poverty, Alkire–Foster method, MPI File-URL: http://www.stata-journal.com/article.html?article=st0723 File-Function: link to article purchase X-DOI: 10.1177/1536867X231195286 Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj23-3/st0723/ Handle:RePEc:tsj:stataj:v:23:y:2023:i:3:p:625-657 Template-Type: ReDIF-Article 1.0 Author-Name: John Tazare Author-Workplace-Name: London School of Hygiene and Tropical Medicine Author-Email: john.tazare1@lshtm.ac.uk Author-Name: Liam Smeeth Author-Workplace-Name: London School of Hygiene and Tropical Medicine Author-Email: liam.smeeth@lshtm.ac.uk Author-Name: Stephen J. W. Evans Author-Workplace-Name: London School of Hygiene and Tropical Medicine Author-Email: stephen.evans@lshtm.ac.uk Author-Name: Ian J. Douglas Author-Workplace-Name: London School of Hygiene and Tropical Medicine Author-Email: ian.douglas@lshtm.ac.uk Author-Name: Elizabeth J. Williamson Author-Workplace-Name: London School of Hygiene and Tropical Medicine Author-Email: elizabeth.williamson@lshtm.ac.uk Title: hdps: A suite of commands for applying high-dimensional propensity-score approaches Journal: Stata Journal Pages: 683-708 Issue: 3 Volume: 23 Year: 2023 Month: September Abstract: Large healthcare databases are increasingly used for research investigating the effects of medications. However, a key challenge is capturing hard-to-measure concepts (often relating to frailty and disease severity) that can be cru- cial for successful confounder adjustment. The high-dimensional propensity score has been proposed as a data-driven method to improve confounder adjustment within healthcare databases and was developed in the context of administrative claims databases. We present hdps, a suite of commands implementing this ap- proach in Stata that assesses the prevalence of codes, generates high-dimensional propensity-score covariates, performs variable selection, and provides investigators with graphical tools for inspecting the properties of selected covariates. Keywords: hdps setup, hdps prevalence, hdps recurrence, hdps prioritize, hdps graphics, electronic health records, claims databases, propensity score, confounder adjustment File-URL: http://www.stata-journal.com/article.html?article=st0725 File-Function: link to article purchase X-DOI: 10.1177/1536867X231196288 Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj23-3/st0725/ Handle:RePEc:tsj:stataj:v:23:y:2023:i:3:p:683-708 Template-Type: ReDIF-Article 1.0 Author-Name: Ryan P. Thombs Author-Workplace-Name: Department of Sociology, Boston College Author-Email: thombs@bc.edu Title: Review of Environmental Econometrics Using Stata, by Christopher F. Baum and Stan Hurn Journal: Stata Journal Pages: 897-900 Issue: 3 Volume: 23 Year: 2023 Month: September Abstract: In this article, I review Environmental Econometrics Using Stata, by Christopher F. Baum and Stan Hurn (2021, Stata Press). Keywords: environmental econometrics, quantitative analysis File-URL: http://www.stata-journal.com/article.html?article=gn0094 File-Function: link to article purchase X-DOI: 10.1177/1536867X231196497 Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj23-3/gn0094/ Handle:RePEc:tsj:stataj:v:23:y:2023:i:3:p:897-900 Template-Type: ReDIF-Article 1.0 Author-Name: Jennifer A. Thompson Author-Workplace-Name: London School of Hygiene and Tropical Medicine Author-Email: jennifer.thompson@lshtm.ac.uk Author-Name: Baptiste Leurent Author-Workplace-Name: London School of Hygiene and Tropical Medicine Author-Email: baptiste.leurent@lshtm.ac.uk Author-Name: Stephen Nash Author-Workplace-Name: London School of Hygiene and Tropical Medicine Author-Email: stephen.nash@lshtm.ac.uk Author-Name: Lawrence H. Moulton Author-Workplace-Name: Johns Hopkins Bloomberg School of Public Health Author-Email: lmoulto1@jhu.edu Author-Name: Richard J. Hayes Author-Workplace-Name: London School of Hygiene and Tropical Medicine Author-Email: Richard.Hayes@lshtm.ac.uk Title: Cluster randomized controlled trial analysis at the cluster level: The clan command Journal: Stata Journal Pages: 754-773 Issue: 3 Volume: 23 Year: 2023 Month: September Abstract: In this article, we introduce a new command, clan, that conducts a cluster-level analysis of cluster randomized trials. The command simplifies adjusting for individual- and cluster-level covariates and can also account for a stratified design. It can be used to analyze a continuous, binary, or rate outcome. Keywords: clan, few clusters, analysis method, adjusting for covariates, stratified trial, group randomized trial, cluster randomized trial, cluster summary analysis File-URL: http://www.stata-journal.com/article.html?article=st0727 File-Function: link to article purchase X-DOI: 10.1177/1536867X231196294 Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj23-3/st0727/ Handle:RePEc:tsj:stataj:v:23:y:2023:i:3:p:7540-773 Template-Type: ReDIF-Article 1.0 Author-Name: Stefan Tübbicke Author-Workplace-Name: Institute for Employment Research Author-Email: stefan.tuebbicke@iab.de Title: ebct: Using entropy balancing for continuous treatments to estimate dose–response functions and their derivatives Journal: Stata Journal Pages: 709-729 Issue: 3 Volume: 23 Year: 2023 Month: September Abstract: Interest in evaluating dose–response functions of continuous treatments has been increasing recently. To facilitate the estimation of causal effects in this setting, I introduce the ebct command for the estimation of dose–response functions and their derivatives using entropy balancing for continuous treatments. First, balancing weights are estimated by numerically solving a globally convex optimization problem. These weights eradicate Pearson correlations between co- variates and the treatment variable. Because simple uncorrelatedness may be insufficient to yield consistent estimates in the next step, higher moments of the treatment variable can be rendered uncorrelated with covariates. Second, the weights are used in local linear kernel regressions to estimate the dose–response function or its derivative. To perform statistical inference, I use a bootstrap pro- cedure. The command also provides the option of producing publication-quality graphs for the estimated relationships. Keywords: ebct, entropy balancing, continuous treatments, balancing weights, observational studies, dose–response functions File-URL: http://www.stata-journal.com/article.html?article=st0726 File-Function: link to article purchase X-DOI: 10.1177/1536867X231196291 Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj23-3/st0726/ Handle:RePEc:tsj:stataj:v:23:y:2023:i:3:p:809-729 Template-Type: ReDIF-Article 1.0 Author-Name: Xueren Zhang Author-Workplace-Name: Wuhan University Author-Email: snowmanzhang@whu.edu.cn Author-Name: Yuan Xue Author-Workplace-Name: Huazhong University of Science and Technology Author-Email: xueyuan19920310@163.com Author-Name: Chuntao Li Author-Workplace-Name: Henan University Author-Email: chtl@henu.edu.cn Title: cntraveltime: Travel distance and travel time in China Journal: Stata Journal Pages: 730-753 Issue: 3 Volume: 23 Year: 2023 Month: September Abstract: In this article, we introduce the command cntraveltime, which can calculate both the travel distance and the travel time between two locations in China with respect to different modes of transportation (driving, public transport, and cycling). Existing commands such as georoute, traveltime, and mqtime have difficulties in parsing Chinese locations. cntraveltime solves this outstanding challenge via a feature that enables it to call route-planning services from the Baidu Maps Open Platform. The results of rigorous testing on the features of the command show that, relative to similar existing commands, cntraveltime has the highest capacity in terms of functionality and precision. This suggests that it can be regarded as a useful complement to other existing commands, especially when calculating travel distance and time for locations within China. Keywords: cntraveltime, Baidu Maps, travel time, travel distance, China geocoding File-URL: http://www.stata-journal.com/article.html?article=dm0111 File-Function: link to article purchase X-DOI: 10.1177/1536867X231196292 Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj23-3/dm0111/ Handle:RePEc:tsj:stataj:v:23:y:2023:i:3:p:730-753 Template-Type: ReDIF-Article 1.0 Author-Name: Guanpeng Yan Author-Workplace-Name: Shandong University Author-Email: guanpengyan@yeah.net Author-Name: Qiang Chen Author-Workplace-Name: Shandong University Author-Email: qiang2chen2@126.com Author-Person: pch913 Title: synth2: Synthetic control method with placebo tests, robustness test, and visualization Journal: Stata Journal Pages: 597-624 Issue: 3 Volume: 23 Year: 2023 Month: September Abstract: The synthetic control method (Abadie and Gardeazabal, 2003, American Economic Review 93: 113–132, Abadie, Diamond, and Hainmueller, 2010, Journal of the American Statistical Association 105: 493–505) is a popular method for causal inference in panel data with one treated unit that often uses placebo tests for statistical inference. While the synthetic control method can be im- plemented by the excellent command synth (Abadie, Diamond, and Hainmueller, 2011, Statistical Software Components S457334, Department of Economics, Boston College), it is still inconvenient for users to conduct placebo tests. As a wrapper program for synth, our proposed synth2 command provides convenient utilities to automate both in-space and in-time placebo tests, as well as the leave-one-out robustness test. Moreover, synth2 produces a complete set of graphs to visualize covariate or unit weights, covariate balance, actual or predicted outcomes, treat- ment effects, placebo tests, ratio of posttreatment mean squared prediction error to pretreatment mean squared prediction error, pointwise p-values (two-sided, right- sided, and left-sided), and the leave-one-out robustness test. We illustrate the use of the synth2 command by revisiting the classic example of California’s tobacco control program (Abadie, Diamond, and Hainmueller 2010). Keywords: synth2, synth, synthetic control method, placebo test, robustness test, causal inference File-URL: http://www.stata-journal.com/article.html?article=st0722 File-Function: link to article purchase X-DOI: 10.1177/1536867X231195278 Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj23-3/st0722/ Handle:RePEc:tsj:stataj:v:23:y:2023:i:3:p:597-624