Template-Type: ReDIF-Article 1.0 Author-Name: Nicholas J. Cox Author-Workplace-Name: Durham University Author-Person: pco34 Author-Name: Stephen P. Jenkins Author-Workplace-Name: London School of Economics Author-Email: s.jenkins@lse.ac.uk Author-Person: pje7 Title: The Stata Journal Editors’ Prize 2025: Michael J. Crowther Journal: Stata Journal Pages: 696-698 Issue: 4 Volume: 25 Year: 2025 Month: December DOI: 10.1177/1536867X251398324 File-URL: http://www.stata-journal.com/article.html?article=gn0105 File-Function: link to article purchase Handle:RePEc:tsj:stataj:v:25:y:2025:i:4:p:696-698 Template-Type: ReDIF-Article 1.0 Author-Name: Kristoffer Bjärkefur Author-Workplace-Name: World Bank Author-Email: kbjarkefur@worldbank.org Author-Name: Benjamin Daniels Author-Workplace-Name: T. H. Chan School of Public Health, Harvard University Author-Email: bdaniels@fas.harvard.edu Author-Person: pda505 Author-Name: Luis Eduardo San Martín Author-Workplace-Name: World Bank Author-Email: lsanmartin@worldbank.org Author-Name: Ankriti Singh Author-Workplace-Name: World Bank Author-Email: asingh43@worldbank.org Title: repkit: Tools for reproducible coding Journal: Stata Journal Pages: 699-718 Issue: 4 Volume: 25 Year: 2025 Month: December DOI: 10.1177/1536867X251398246 Abstract: Writing Stata code that produces the same results on another user’s machine is an essential component of modern reproducible data analysis work- flows. However, a number of reasons may make it difficult to do so without detailed knowledge of the recipient’s environment. For example, differences be- tween installation of (third-party) community-contributed files may cause failures. Furthermore, even when the environment is not an issue, users may make er- rors regarding random-number generation in the Stata code. These issues can be very challenging to detect from the code output alone. The repkit package provides new tools to automate: the location of root file paths; the configuration of community-contributed command installations; “linting” of the Stata code for readability; and the precise detection of code issues affecting reproducibility. Keywords: repkit, reproot, repado, reprun, lint, linter, ado-files, root paths, directory paths, reproducibility File-URL: http://www.stata-journal.com/article.html?article=st0788 File-Function: link to article purchase Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj25-4/st0788/ Handle:RePEc:tsj:stataj:v:25:y:2025:i:4:p:699-718 Template-Type: ReDIF-Article 1.0 Author-Name: Anthony J. Gambino Author-Workplace-Name: University of Connecticut Author-Email: anthony.gambino@uconn.edu Author-Name: D. Betsy McCoach Author-Workplace-Name: Fordham University Author-Email: mccoach@fordham.edu Title: r2_mlm: A command for computing R-squared measures for models fit by mixed Journal: Stata Journal Pages: 719-742 Issue: 4 Volume: 25 Year: 2025 Month: December DOI: 10.1177/1536867X251398326 Abstract: The article by Rights and Sterba (2023, Multivariate Behavioral Research 58: 340–367) provides a comprehensive framework for computing R2 measures for (linear) multilevel models. In this article, we introduce r2_mlm, a postestimation command for mixed that computes R2 measures using Rights and Sterba’s framework. We explain how this R2 framework works and demonstrate how r2_mlm can be used to compute various R2 measures for models fit by mixed. One of the most useful features of r2_mlm is that it will produce warning messages if the user specifies the model in a way that may lead to conflation bias (an easily overlooked issue). Finally, we walk through a simple example and explain how to interpret the various R2 measures. Keywords: r2_mlm, mixed, multilevel modeling, explained variation, R2, conflation bias File-URL: http://www.stata-journal.com/article.html?article=st0789 File-Function: link to article purchase Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj25-4/st0789/ Handle:RePEc:tsj:stataj:v:25:y:2025:i:4:p:719-742 Template-Type: ReDIF-Article 1.0 Author-Name: Rodolfo G. Campos Author-WorkPlace-Name: Banco de España Author-Email: rodolfo.campos@bde.es Author-Person: pca508 Author-Name: Iliana Reggio Author-WorkPlace-Name: Universidad Autónoma de Madrid Author-Email: iliana.reggio@uam.es Author-Person: pre192 Author-Name: Jacopo Timini Author-WorkPlace-Name: Banco de España Author-Email: jacopo.timini@bde.es Author-Person: pti239 Title: ge_gravity2: A command for solving universal gravity models Journal: Stata Journal Pages: 743-771 Issue: 4 Volume: 25 Year: 2025 Month: December DOI: 10.1177/1536867X251398335 Abstract: In this article, we describe an algorithm for computing counterfactual trade flows, prices, output, and welfare in a large class of general equilibrium trade models. We introduce a command called ge_gravity2, which allows users to per- form these computations in Stata. This command extends the existing ge_gravity command by allowing users to compute the general equilibrium effects of changes in trade policy in positive supply elasticity models. It can be used to solve any model that falls into the class of universal gravity models as defined by Allen, Arkolakis, and Takahashi (2020, Journal of Political Economy 128: 393–433). Keywords: ge_gravity2, general equilibrium, structural gravity, universal gravity model, positive supply elasticity, trade policy File-URL: http://www.stata-journal.com/article.html?article=st0790 File-Function: link to article purchase Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj25-4/st0790/ Handle:RePEc:tsj:stataj:v:25:y:2025:i:4:p:743-771 Template-Type: ReDIF-Article 1.0 Author-Name: Giuseppe De Luca Author-Workplace-Name: University of Palermo Author-Email: giuseppe.deluca@unipa.it Author-Person: pde440 Author-Name: Jan R. Magnus Author-Workplace-Name: Vrije Universiteit Amsterdam Author-Email: jan@janmagnus.nl Author-Person: pma753 Title: Weighted-average least squares: Beyond the classical linear regression model Journal: Stata Journal Pages: 772-811 Issue: 4 Volume: 25 Year: 2025 Month: December DOI: 10.1177/1536867X251398599 Abstract: In this article, we introduce four new commands for the weighted- average least-squares approach to model uncertainty. The hetwals command fits linear models with multiplicative forms of heteroskedasticity; the ar1wals command fits linear models with stationary first-order autoregressive errors; the xtwals command fits fixed-effects and random-effects panel-data models with ei- ther independent and identically distributed or first-order autoregressive idiosyn- cratic errors; and the glmwals command fits univariate generalized linear mod- els. These commands extend the new functionalities of the wals command (ver- sion 3.0), introduced by De Luca and Magnus (2025, Stata Journal 25: 587–626), and enlarge the classes of models that can be fit by this model-averaging method. We also illustrate the hetwals and glmwals commands via real-data applications. Keywords: hetwals, ar1wals, xtwals, glmwals, postestimation, weighted- average least squares, heteroskedasticity, serial correlation, panel data, generalized linear models File-URL: http://www.stata-journal.com/article.html?article=st0791 File-Function: link to article purchase Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj25-4/st0791/ Handle:RePEc:tsj:stataj:v:25:y:2025:i:4:p:772-811 Template-Type: ReDIF-Article 1.0 Author-Name: Robert Thiesmeier Author-Email: robert.thiesmeier@ki.se Author-WorkPlace-Name: Karolinska Institutet Author-Name: Matteo Bottai Author-Email: matteo.bottai@ki.se Author-WorkPlace-Name: Karolinska Institutet Author-Name: Nicola Orsini Author-Email: nicola.orsini@ki.se Author-WorkPlace-Name: Karolinska Institutet Author-Person: por11 Title: Imputing missing values with external data: Applications for multisite settings and federated analyses Journal: Stata Journal Pages: 812-835 Issue: 4 Volume: 25 Year: 2025 Month: December DOI: 10.1177/1536867X251398605 Abstract: Missing data are a common challenge across scientific disciplines. Current imputation methods require the availability of individual data to impute missing values. However, missingness often requires using external data for the im- putation, particularly in multisite settings and federated analyses. We introduce a new command, mi impute from, designed to impute missing values using linear predictors and their related covariance matrix from imputation models fit in one or multiple external studies. This allows for the imputation of any missing val- ues without sharing individual data between studies. We describe the underlying method and present the syntax of mi impute from alongside practical examples of missing data in collaborative research projects. Keywords: mi impute from, mi_impute_from_get, univariate imputation, missing data, systematically missing data, meta-analysis, quantile regression, logistic regression, multiple imputation, pooling projects, data network File-URL: http://www.stata-journal.com/article.html?article=st0792 File-Function: link to article purchase Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj25-4/st0792/ Handle:RePEc:tsj:stataj:v:25:y:2025:i:4:p812-835 Template-Type: ReDIF-Article 1.0 Author-Name: Javier Alejo Author-Workplace-Name: IECON–Universidad de la República Author-Email: javier.alejo@fcea.edu.uy Author-Person: pal181 Author-Name: Antonio F. Galvao Author-Workplace-Name: Michigan State University Author-Email: agalvao@msu.edu Author-Person: pga1288 Author-Name: Gabriel Montes-Rojas Author-Workplace-Name: Instituto Interdisciplinario de Economía Política, CONICET–Universidad de Buenos Aires (UBA) Author-Email: gabriel.montes@economicas.uba.ar Author-Person: pmo380 Title: Testing for slope heterogeneity bias in the fixed-effects estimator Journal: Stata Journal Pages: 836-846 Issue: 4 Volume: 25 Year: 2025 Month: September Abstract: In this article, we discuss a postestimation command, xthbtest, to test for the validity of the fixed-effects estimation in the presence of heterogeneity in panel-data settings. The procedure is based on the conditions to obtain the mean effect across individuals by comparing it with the mean-group alternative estimator. An empirical application with a Solow-type growth model illustrates its implementation. Keywords: xthbtest, panel data, fixed effects, heterogeneity File-URL: http://www.stata-journal.com/article.html?article=st0793 File-Function: link to article purchase DOI: 10.1177/1536867X251398607 Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj25-4/st0793/ Handle:RePEc:tsj:stataj:v:25:y:2025:i:4:p:836-846 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: Some notes on quadratic fits Journal: Stata Journal Pages: 847-864 Issue: 4 Volume: 25 Year: 2025 Month: December DOI: 10.1177/1536867X251398616 Abstract: Quadratic fits are often used in regression and other modeling projects as either the whole of a model or part of a larger model. In this column, I discuss various small Stata devices that may help, including the twoway qfit command, calculation of the turning point position from coefficient estimates, and plotting the fitted curve over a wider range. The main principles carry over from regression to various more complicated models such as generalized linear models. A specific example is the model known in statistical ecology as Gaussian logit, which is just a logit regression fitting a unimodal bell-like curve to a proportion as a quadratic function of some controlling variable. The column includes commentary on wider historical, scientific, and statistical aspects of quadratic fits, with some remarks on their limitations and alternatives. Keywords: quadratic fit, linear fit, turning points, transformations, Gaussian logit, regression graphics, twoway qfit, twoway function, stored results File-URL: http://www.stata-journal.com/article.html?article=st0794 File-Function: link to article purchase Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj25-4/st0794/ Handle:RePEc:tsj:stataj:v:25:y:2025:i:4:p:847-864 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 165: Marginal titles for graph bar, graph dot, graph box, and beyond Journal: Stata Journal Pages: 865-871 Issue: 4 Volume: 25 Year: 2025 Month: December File-URL: http://www.stata-journal.com/article.html?article=gr0102 File-Function: link to article purchase DOI: 10.1177/1536867X241297950 Handle:RePEc:tsj:stataj:v:25:y:2025:i:4:p:865-871 Template-Type: ReDIF-Article 1.0 Author-Name: Christopher F Baum Author-Workplace-Name: Boston College Author-Email: baum@bc.edu Author-Person: pba1 Title: Stata tip 166: Changing the axis scale with marginsplot Journal: Stata Journal Pages: 872-873 Issue: 4 Volume: 25 Year: 2025 Month: December File-URL: http://www.stata-journal.com/article.html?article=gr0103 File-Function: link to article purchase DOI: 10.1177/1536867X241297950 Handle:RePEc:tsj:stataj:v:25:y:2025:i:4:p:873-873 Template-Type: ReDIF-Article 1.0 Author-Name: Editors Author-Email: editors@stata.com Title: Software updates Journal: Stata Journal Pages: 874 Issue: 4 Volume: 25 Year: 2025 Month: December DOI: 10.1177/1536867X251398323 Abstract: Updates for previously published packages are provided. Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj25-4/dm0048_6/ Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj25-4/gr0072_2/ Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj25-4/st0389_12/ Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj25-4/st0626_1/ Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj25-4/st0695_2/ Note: Windows users should not attempt to download these files with a web browser. Handle:RePEc:tsj:stataj:v:25:y:2025:i:4:p:874