Template-Type: ReDIF-Article 1.0 Author-Name: Marius Radean Author-Workplace-Name: University of Essex Author-Email: mradean@essex.ac.uk Title: ginteff: A generalized command for computing interaction effects Journal: Stata Journal Pages: 301-335 Issue: 2 Volume: 23 Year: 2023 Month: June Abstract: Interaction analyses are useful tools to examine complex socioeconomic outcomes in which the effect of one variable depends on the presence or values of another variable. Interaction effects capture simultaneous changes in two (or more) covariates, and their computation is especially challenging in nonlinear models. For such models, a statistically significant interaction-term coefficient does not necessarily indicate significant interactive effects. For analyses in which the interaction effect cannot be inferred from the model estimates, I introduce ginteff, a new command that automatically computes two- and three-way interaction effects. The command accommodates a large suite of estimation models and allows researchers to use either the partial derivative or the first difference to model the effect of the interacted variables. Keywords: ginteff, ginteffplot, average interaction effect, individual-level interaction effects, two-way interactions, three-way interactions File-URL: http://www.stata-journal.com/article.html?article=st0711 File-Function: link to article purchase DOI: 10.1177/1536867X231175253 Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj23-2/st0711/ Handle: RePEc:tsj:stataj:v:23:y:2023:i:2:p:301-335 Template-Type: ReDIF-Article 1.0 Author-Name: Ben Jann Author-Workplace-Name: University of Bern Author-Email: ben.jann@unibe.ch Author-Person: pja61 Title: Color palettes for Stata graphics: An update Journal: Stata Journal Pages: 336-385 Issue: 2 Volume: 23 Year: 2023 Month: June Abstract: This article is an update to Jann (2018a, Stata Journal 18: 765–785). It contains a comprehensive discussion of the colorpalette command, including various changes and additions that have been made to the software since its first publication. Command colorpalette provides colors for use in Stata graphics. In addition to Stata’s default colors, colorpalette supports a variety of named colors, a selection of palettes that have been proposed by users, numerous collections of palettes and colormaps from sources such as ColorBrewer, Carto, D3.js, or Matplotlib, as well as color generators in different color spaces. Furthermore, a new command called colorcheck is presented that can be used to evaluate whether colors are distinguishable by people suffering from color vision deficiency. Keywords: palettes, colorpalette, colorcheck, ColrSpace, graph, graphics, color, color spaces, color interpolation, color vision deficiency, grayscale conversion, perceptually uniform File-URL: http://www.stata-journal.com/article.html?article=gr0075_1 File-Function: link to article purchase DOI: 10.1177/1536867X231175264 Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj23-2/gr0075_1/ Handle: RePEc:tsj:stataj:v:23:y:2023:i:2:p:336-385 Template-Type: ReDIF-Article 1.0 Author-Name: Harald Tauchmann Author-Workplace-Name: Friedrich-Alexander-Universität Erlangen-Nürnberg Author-Email: harald.tauchmann@fau.de Author-Person: pta144 Title: lgrgtest: Lagrange multiplier test after constrained maximum-likelihood estimation Journal: Stata Journal Pages: 386-401 Issue: 2 Volume: 23 Year: 2023 Month: June Abstract: Besides the Wald and likelihood-ratio tests, the Lagrange multiplier test (Rao, 1948, Mathematical Proceedings of the Cambridge Philosophical Society 44: 50–57; Aitchison and Silvey, 1958, Annals of Mathematical Statistics 29: 813–828; Silvey, 1959, Annals of Mathematical Statistics 30: 389–407) is the third canonical approach to testing hypotheses after maximum likelihood estimation. While the Stata commands test and lrtest implement the first two, Stata does not have an official command for implementing the third. The communitycontributed boottest package (Roodman et al., 2019, Stata Journal 19: 4–60) focuses on methods of bootstrap inference and also implements the Lagrange multiplier test functionality. In this article, I introduce the new communitycontributed postestimation command lgrgtest, which allows for straightforwardly using the Lagrange multiplier test after constrained maximum-likelihood estimation. lgrgtest is intended to be compatible with all Stata estimation commands that use maximum likelihood and allow for the options constraints(), iterate(), and from(). lgrgtest can also be used after cnsreg. Keywords: lgrgtest, test, lrtest, constraint, Lagrange multiplier test, score test, constraints, maximum likelihood File-URL: http://www.stata-journal.com/article.html?article=st0712 File-Function: link to article purchase DOI: 10.1177/1536867X231175265 Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj23-2/st0712/ Handle: RePEc:tsj:stataj:v:23:y:2023:i:2:p:386-401 Template-Type: ReDIF-Article 1.0 Author-Name: David M. Drukker Author-Workplace-Name: Sam Houston State University Author-Email: dxd070@shsu.edu Author-Person: pdr184 Author-Name: Di Liu Author-Workplace-Name: StataCorp Author-Email: dliu@stata.com Title: posw: A command for the stepwise Neyman-orthogonal estimator Journal: Stata Journal Pages: 402-417 Issue: 2 Volume: 23 Year: 2023 Month: June Abstract: Inference for structural and treatment parameters while having highdimensional covariates in the model is increasingly common. The Neyman-orthogonal (NO) estimators in Belloni, Chernozhukov, and Wei (2016, Journal of Business and Economic Statistics 34: 606–619) produce valid inferences for the parameters of interest while using generalized linear model lasso methods to select the covariates. Drukker and Liu (2022, Econometric Reviews 41: 1047–1076) extended the estimators in Belloni, Chernozhukov, and Wei (2016) by using a Bayesian information criterion stepwise method and a testing-stepwise method as the covariate selector. Drukker and Liu (2022) found a family of data-generating processes for which the NO estimator based on Bayesian information criterion stepwise produces much more reliable inferences than the lasso-based NO estimator. In this article, we describe the implementation of posw, a command for the stepwise-based NO estimator for the high-dimensional linear, logit, and Poisson models. Keywords: posw, high-dimensional model, covariate selection, partialing out, stepwise, Neyman-orthogonal, generalized linear model, postselection inference File-URL: http://www.stata-journal.com/article.html?article=st0713 File-Function: link to article purchase DOI: 10.1177/1536867X231175272 Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj23-2/st0713/ Handle: RePEc:tsj:stataj:v:23:y:2023:i:2:p:402-417 Template-Type: ReDIF-Article 1.0 Author-Name: Laura Magazzini Author-Workplace-Name: Sant’Anna School of Advanced Studies Author-Email: laura.magazzini@santannapisa.it Author-Person: pma1141 Author-Name: Giorgio Calzolari Author-Workplace-Name: Università di Firenze Author-Email: giorgio.calzolari@unifi.it Author-Person: pca337 Title: A Lagrange multiplier test for the mean stationarity assumption in dynamic panel-data models Journal: Stata Journal Pages: 418-437 Issue: 2 Volume: 23 Year: 2023 Month: June Abstract: In this article, we describe the xttestms command, which implements the Lagrange multiplier test proposed by Magazzini and Calzolari (2020, Econometric Reviews 39: 115–134). The test verifies the validity of the initial conditions in dynamic panel-data models, which is required for consistency of the system generalized method of moments estimator. Keywords: xttestms, panel data, dynamic model, generalized method of moments estimation, initial conditions, test of overidentifying restrictions, Lagrange multiplier test File-URL: http://www.stata-journal.com/article.html?article=st0714 File-Function: link to article purchase DOI: 10.1177/1536867X231175276 Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj23-2/st0714/ Handle: RePEc:tsj:stataj:v:23:y:2023:i:2:p:418-437 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 Author-Name: Simon Reese Author-Workplace-Name: Lund University Author-Email: simon.reese@nek.lu.se Title: xtnumfac: A battery of estimators for the number of common factors in time series and panel-data models Journal: Stata Journal Pages: 438-454 Issue: 2 Volume: 23 Year: 2023 Month: June Abstract: In this article, we introduce a new community-contributed command, xtnumfac, for estimating the number of common factors in time-series and panel datasets using the methods of Bai and Ng (2002, Econometrica 70: 191–221), Ahn and Horenstein (2013, Econometrica 81: 1203–1227), Onatski (2010, Review of Economics and Statistics 92: 1004–1016), and Gagliardini, Ossola, and Scaillet (2019, Journal of Econometrics 212: 503–521). Common factors are usually unobserved or unobservable. In time series, they influence all predictors, while in paneldata models, they influence all cross-sectional units at different degrees. Examples are shocks from oil prices, inflation, or demand or supply shocks. Knowledge about the number of factors is key for multiple econometric estimation methods, such as Pesaran (2006, Econometrica 74: 967–1012), Bai (2009, Econometrica 77: 1229–1279), Norkute et al. (2021, Journal of Econometrics 220: 416–446), and Kripfganz and Sarafidis (2021, Stata Journal 21: 659–686). This article discusses a total of 10 methods to estimate the number of common factors. Examples based on Kapetanios, Pesaran, and Reese (2021, Journal of Econometrics 221: 510–541) show that U.S. house prices are exposed to up to 10 common factors. Therefore, when one fits models with house prices as a dependent variable, the number of factors must be considered. Keywords: xtnumfac, common factors, factor models, cross-section dependence, panel-data models, time-series models File-URL: http://www.stata-journal.com/article.html?article=st0715 File-Function: link to article purchase DOI: 10.1177/1536867X231175305 Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj23-2/st0715/ Handle:RePEc:tsj:stataj:v:23:y:2023:i:2:p:438-454 Template-Type: ReDIF-Article 1.0 Author-Name: Maren Eckert Author-Workplace-Name: University of Freiburg Author-Email: maren.eckert@imbi.uni-freiburg.de Author-Name: Werner Vach Author-Workplace-Name: University of Basel Author-Email: werner.vach@unibas.ch Title: Visualizing uncertainty in a two-dimensional estimate using confidence and comparison regions Journal: Stata Journal Pages: 455-490 Issue: 2 Volume: 23 Year: 2023 Month: June Abstract: Recently, Eckert and Vach (2020, Biometrical Journal 62: 598–609) pointed out that both confidence and comparison regions are useful tools to visualize uncertainty in a two-dimensional estimate. Both types of regions can be based on inverting Wald tests or likelihood-ratio tests. confcomptwo enables Stata users to draw both types of regions following one of the two principles for various two-dimensional estimation problems. The use of confcomptwo is illustrated by several examples. Keywords: confcomptwo, two-dimensional parameter space, confidence region, comparison region, Wald test, profile likelihood, likelihood-ratio test, diagnostic accuracy studies File-URL: http://www.stata-journal.com/article.html?article=st0716 File-Function: link to article purchase DOI: 10.1177/1536867X231175314 Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj23-2/st0716/ Handle: RePEc:tsj:stataj:v:23:y:2023:i:2:p:455-490 Template-Type: ReDIF-Article 1.0 Author-Name: Morten Overgaard Author-Workplace-Name: Aarhus University Author-Email: moov@ph.au.dk Author-Name: Per Kragh Andersen Author-Workplace-Name: University of Copenhagen Author-Email: pka@biostat.ku.dk Author-Name: Erik Thorlund Parner Author-Workplace-Name: Aarhus University Author-Email: parner@ph.au.dk Title: Pseudo-observations in a multistate setting Journal: Stata Journal Pages: 491-517 Issue: 2 Volume: 23 Year: 2023 Month: June Abstract: Regression analyses of how state occupation probabilities or expected lengths of stay depend on covariates in multistate settings can be performed using the pseudo-observation method, which involves calculating jackknife pseudoobservations based on some estimator of the expected value of the outcome. In this article, we present a new command, stpmstate, that calculates such pseudoobservations based on the Aalen–Johansen estimator. We give examples of use of the command, and we conduct a small simulation study to offer insights into the pseudo-observation regression approach. Keywords: stpmstate, multistate model, regression analysis, state occupation probability, length of stay, jackknife, pseudovalues, Aalen–Johansen estimator File-URL: http://www.stata-journal.com/article.html?article=st0717 File-Function: link to article purchase DOI: 10.1177/1536867X231175332 Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj23-2/st0717/ Handle: RePEc:tsj:stataj:v:23:y:2023:i:2:p:491-517 Template-Type: ReDIF-Article 1.0 Author-Name: David M. Drukker Author-Workplace-Name: Sam Houston State University Author-Email: dxd070@shsu.edu Author-Person: pdr184 Title: Simultaneous tests and confidence bands for Stata estimation commands Journal: Stata Journal Pages: 518-544 Issue: 2 Volume: 23 Year: 2023 Month: June Abstract: Stata estimation commands that implement frequentist methods produce an output table that contains multiple tests and multiple confidence intervals. Presumably, the multiple tests and multiple confidence are designed to help determine which parameters are responsible for a possible rejection of the overall null hypothesis of no effect. When taken by itself, each test and each confidence interval provides valid inference about the null hypothesis of no effect for each parameter at the specified error rate. However, simultaneously using two or more of these tests or confidence intervals provides inference at an error rate that exceeds the one specified. In this article, I discuss the sotable command, which provides p-values that are adjusted for the multiple tests and a confidence band that can be used to simultaneously test multiple parameters for no effect after almost all frequentist estimation commands. I also provide an introduction to the literature on simultaneous inference. Keywords: sotable, multiple comparisons, confidence bands, simultaneous inference, multiple testing, max-t, simultaneous tests File-URL: http://www.stata-journal.com/article.html?article=st0718 File-Function: link to article purchase DOI: 10.1177/1536867X231175333 Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj23-2/st0718/ Handle: RePEc:tsj:stataj:v:23:y:2023:i:2:p:518-544 Template-Type: ReDIF-Article 1.0 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 Author-Name: Haitao Si Author-Workplace-Name: Wuhan University Author-Email: sihaitao0114@163.com Title: Reporting empirical results to .docx files Journal: Stata Journal Pages: 545-577 Issue: 2 Volume: 23 Year: 2023 Month: June Abstract: Reporting empirical results to automatically generate structured tables is important but time consuming for empirical researchers. Because of the lack of commands that can effectively create and edit Office Open XML documents (.docx documents), neither official commands nor community-contributed commands could tabulate results to this regularly used document type until putdocx was launched in Stata 15. In this article, we introduce four new commands: sum2docx, corr2docx, t2docx, and reg2docx. These new commands are all based on putdocx. They can be coalesced and can report summary statistics, correlation coefficient matrices, split-sample t tests, and regression results automatically in one .docx file. The commands are user friendly and can provide researchers with new options for reporting empirical results. Keywords: sum2docx, corr2docx, t2docx, reg2docx, putdocx, Office Open XML documents, empirical results File-URL: http://www.stata-journal.com/article.html?article=st0719 File-Function: link to article purchase DOI: 10.1177/1536867X231175334 Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj23-2/st0719/ Handle: RePEc:tsj:stataj:v:23:y:2023:i:2:p:545-577 Template-Type: ReDIF-Article 1.0 Author-Name: Marcos Demetry Author-Workplace-Name: Linnaeus University Author-Email: marcos.demetry@lnu.se Author-Person: pde1285 Author-Name: Per Hjertstrand Author-Workplace-Name: Research Institute of Industrial Economics, Stockholm Author-Email: per.hjertstrand@ifn.se Author-Person: phj4 Title: Consistent subsets: Computing the Houtman–Maks index in Stata Journal: Stata Journal Pages: 578-588 Issue: 2 Volume: 23 Year: 2023 Month: June Abstract: The Houtman–Maks index is a measure of the size of a violation of utility-maximizing (that is, rational) behavior. In this article, we introduce the command hmindex, which calculates the Houtman–Maks index for a dataset of prices and observed choices of a consumer. The command is illustrated with an empirical application. Keywords: hmindex, Houtman–Maks index, revealed preference, WGARP, WARP File-URL: http://www.stata-journal.com/article.html?article=st0720 File-Function: link to article purchase DOI: 10.1177/1536867X231175345 Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj23-2/st0720/ Handle: RePEc:tsj:stataj:v:23:y:2023:i:2:p:578-588 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 Author-Name: Clyde B. Schechter Author-Workplace-Name: Albert Einstein College of Medicine Author-Email: clyde.schechter@einsteinmed.edu Title: Stata tip 152: if and if: When to use the if qualifier and when to use the if command Journal: Stata Journal Pages: 589-594 Issue: 2 Volume: 23 Year: 2023 Month: June File-URL: http://www.stata-journal.com/article.html?article=st0721 File-Function: link to article purchase DOI: 10.1177/1536867X231175349 Handle: RePEc:tsj:stataj:v:23:y:2023:i:2:p:589-594 Template-Type: ReDIF-Article 1.0 Author-Name: Editors Author-Email: editors@stata.com Title: Software updates Journal: Stata Journal Pages: 595-596 Issue: 2 Volume: 23 Year: 2023 Month: June Abstract: Updates for previously published packages are provided. Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj23-2/dm0042_4/ Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj23-2/dm0085_3/ Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj23-2/st0175_3/ Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj23-2/st0284_1/ Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj23-2/st0606_1/ Handle:RePEc:tsj:stataj:v:23:y:2023:i:2:p:595-596