Template-Type: ReDIF-Article 1.0 Author-Name: H. Joseph Newton Author-Workplace-Name: Texas A&M University Author-Name: Nicholas J. Cox Author-Workplace-Name: Durham University Author-Person: pco34 Title: The Stata Journal Editors’ Prize 2018: Federico Belotti Journal: Stata Journal Pages: 761-764 Issue: 4 Volume: 18 Year: 2018 Month: December File-URL: http://www.stata-journal.com/article.html?article=gn0077 File-Function: link to article purchase Handle:RePEc:tsj:stataj:v:18:y:2018:i:4:p:761-764 Template-Type: ReDIF-Article 1.0 Author-Name: Ben Jann Author-Workplace-Name: University of Bern Author-Email: ben.jann@soz.unibe.ch Title: Color palettes for Stata graphics Journal: Stata Journal Pages: 765-785 Issue: 4 Volume: 18 Year: 2018 Month: December Abstract: In this article, I introduce the colorpalette command, which provides many color palettes and color generators for use in Stata graphics. It supports color palettes from official Stata’s graph schemes, a selection of palettes that have been proposed by users, standard collections such as the ColorBrewer or D3.js palettes, and HSV and HCL color generators. As a by-product, I also introduce commands for marker-symbol and line-pattern palettes. Keywords: palettes, colorpalette, symbolpalette, linepalette, graph, graphics, color, color spaces File-URL: http://www.stata-journal.com/article.html?article=gr0075 File-Function: link to article purchase Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj18-3/gr0075/ Handle:RePEc:tsj:stataj:y:18:y:2018:i:4:p:765-785 Template-Type: ReDIF-Article 1.0 Author-Name: Ben Jann Author-Workplace-Name: University of Bern Author-Email: ben.jann@soz.unibe.ch Title: Customizing Stata graphs made easy (part 2) Journal: Stata Journal Pages: 786-802 Issue: 4 Volume: 18 Year: 2018 Month: December Abstract: In Jann (2018b, Stata Journal 18: 491–502), I presented a command called grstyle that simplifies changing the default look of Stata graphs. The command, however, still relies on idiosyncratic scheme file syntax, which may not be well known to many users. In this article, I therefore present an extension called grstyle set that automates the creation of sets of scheme file entries for a number of potentially useful adjustments, without much typing and without requiring much knowledge about scheme file syntax. Covered topics include, for example, the rendering of the background and coordinate system, the placement and look of the legend, the assignment of colors, symbols, and line patterns, and the assignment of relative or absolute sizes. Keywords: grstyle, grstyle set, graph, graphics, scheme files File-URL: http://www.stata-journal.com/article.html?article=gr0073_1 File-Function: link to article purchase Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj18-3/gr0073_1/ Handle:RePEc:tsj:stataj:y:18:y:2018:i:4:p:786-802 Template-Type: ReDIF-Article 1.0 Author-Name: Liyang Sun Author-Workplace-Name: MIT Author-Email: lsun20@mit.edu Title: Implementing valid two-step identification-robust confidence sets for linear instrumental-variables models Journal: Stata Journal Pages: 803-825 Issue: 4 Volume: 18 Year: 2018 Month: December Abstract: In this article, we consider inference in the linear instrumental- variables models with one or more endogenous variables and potentially weak instruments. I developed a command, twostepweakiv, to implement the two- step identification-robust confidence sets proposed by Andrews (2018, Review of Economics and Statistics 100: 337–348) based on Wald tests and linear combi- nation tests (Andrews, 2016, Econometrica 84: 2155–2182). Unlike popular pro- cedures based on first-stage F statistics (Stock and Yogo, 2005, Testing for weak instruments in linear IV regression, in Identification and Inference for Economet- ric Models: Essays in Honor of Thomas Rothenberg), the two-step identification- robust confidence sets control coverage distortion without assuming the data are homoskedastic. I demonstrate the use of twostepweakiv with an example of an- alyzing the effect of wages on married female labor supply. For inference on sub- sets of parameters, twostepweakiv also implements the refined projection method (Chaudhuri and Zivot, 2011, Journal of Econometrics 164: 239–251). I illustrate that this method is more powerful than the conventional projection method using Monte Carlo simulations. Keywords: twostepweakiv, coverage, first-stage F statistic, pretesting, weak instruments File-URL: http://www.stata-journal.com/article.html?article=st0541 File-Function: link to article purchase Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj18-4/st0541/ Handle:RePEc:tsj:stataj:v:18:y:2018:i:4:p:803-825 Template-Type: ReDIF-Article 1.0 Author-Name: Michael J. Grayling Author-WorkPlace-Name: MRC Biostatistics Unit Author-Email: mjg211@cam.ac.uk Author-Name: Adrian P. Mander Author-WorkPlace-Name: MRC Biostatistics Unit Author-Email: adrian.mander@mrc-bsu.cam.ac.uk Title: Calculations involving the multivariate normal and multivariate t distributions with and without truncation Journal: Stata Journal Pages: 826-843 Issue: 4 Volume: 18 Year: 2018 Month: December Abstract: In this article, we present a set of commands and Mata functions to eval- uate different distributional quantities of the multivariate normal distribution and a particular type of noncentral multivariate t distribution. Specifically, their densi- ties, distribution functions, equicoordinate quantiles, and pseudo–random vectors can be computed efficiently, in either the absence or the presence of variable trun- cation. Keywords: mvnormalden, pmvnormal, invmvnormal, rmvnormal, mvtden, mvt, invmvt, rmvt, tmvnormalden, tmvnormal, invtmvnormal, rtmvnormal, tmvtden, tmvt, invtmvt, rtmvt, multivariate normal, multivariate t, truncated distribution File-URL: http://www.stata-journal.com/article.html?article=st0542 File-Function: link to article purchase Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj18-4/st0542/ Handle:RePEc:tsj:stataj:v:18:y:2018:i:4:p:826-843 Template-Type: ReDIF-Article 1.0 Author-Name: Raffaele Grotti Author-Email: raffaele.grotti@eui.eu Author-WorkPlace-Name: European University Institute Author-Name: Giorgio Cutuli Author-Email: g.cutuli@unitn.it Author-WorkPlace-Name: University of Trento Title: xtpdyn: A community-contributed command for fitting dynamic random-effects probit models with unobserved heterogeneity Journal: Stata Journal Pages: 844-862 Issue: 4 Volume: 18 Year: 2018 Month: December Abstract: Dynamic random-effects probit models are increasingly applied in many disciplines to study dynamics of persistence in dichotomous outcomes. Despite the increasing popularity of these models, an estimation command for them does not exist yet. In this article, we present the xtpdyn command, which implements the model as proposed by Rabe-Hesketh and Skrondal (2013, Economics Letters 120: 346–349). We also present probat, a postestimation command that provides estimates of transition rates and a set of associated statistics. Keywords: xtpdyn, probat, dynamic panel models, dynamic random-effects probit, state dependence, unobserved heterogeneity File-URL: http://www.stata-journal.com/article.html?article=st0543 File-Function: link to article purchase Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj18-4/st0543/ Handle:RePEc:tsj:stataj:v:18:y:2018:i:4:p:844-862 Template-Type: ReDIF-Article 1.0 Author-Name: Sébastien Fontenay Author-Email: sebastien.fontenay@uclouvain.be Author-WorkPlace-Name: Université catholique de Louvain Title: sdmxuse: Command to import data from statistical agencies using the SDMX standard Journal: Stata Journal Pages: 863-870 Issue: 4 Volume: 18 Year: 2018 Month: December Abstract: In this article, I present the command sdmxuse, which allows users to download and import statistical data from international organizations using the Statistical Data and Metadata eXchange standard (SDMX). The data structure is reviewed to show how users can send specific queries and import only the required time series. Keywords: sdmxuse, data import, data management, European Central Bank, Eurostat, International Monetary Fund, Organisation for Economic Co- operation and Development, United Nations, World Bank File-URL: http://www.stata-journal.com/article.html?article=dm0097 File-Function: link to article purchase Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj18-4/dm0097/ Handle:RePEc:tsj:stataj:v:18:y:2018:i:4:p:863-870 Template-Type: ReDIF-Article 1.0 Author-Name: Daniel Klein Author-Workplace-Name: International Centre for Higher Education Research Kassel Author-Email: klein@incher.uni-kassel.de Title: Implementing a general framework for assessing interrater agreement in Stata Journal: Stata Journal Pages: 871-901 Issue: 4 Volume: 18 Year: 2018 Month: December Abstract: Despite its well-known weaknesses, researchers continuously choose the kappa coefficient (Cohen, 1960, Educational and Psychological Measurement 20: 37–46; Fleiss, 1971, Psychological Bulletin 76: 378–382) to quantify agreement among raters. Part of kappa’s persistent popularity seems to arise from a lack of available alternative agreement coefficients in statistical software packages such as Stata. In this article, I review Gwet’s (2014, Handbook of Inter-Rater Reliability) recently developed framework of interrater agreement coefficients. This framework extends several agreement coefficients to handle any number of raters, any number of rating categories, any level of measurement, and missing values. I introduce the kappaetc command, which implements this framework in Stata. Keywords: kappaetc, kappaetci, Cohen, Fleiss, Gwet, interrater agreement, kappa, Krippendorff, reliability File-URL: http://www.stata-journal.com/article.html?article=st0544 File-Function: link to article purchase Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj18-4/st0544/ Handle:RePEc:tsj:stataj:v:18:y:2018:i:4:p:871-901 Template-Type: ReDIF-Article 1.0 Author-Name: Soren Jordan Author-Workplace-Name: Auburn University Author-Email: sorenjordanpols@gmail.com Author-Name: Andrew Q. Philips Author-Workplace-Name: University of Colorado Boulder Author-Email: andrew.philips@colorado.edu Title: Cointegration testing and dynamic simulations of autoregressive distributed lag modelsJournal: Stata Journal Pages: 902-923 Issue: 4 Volume: 18 Year: 2018 Month: December Abstract: In this article, we introduce dynamac, a suite of commands designed to assist users in modeling and visualizing the effects of autoregressive distributed lag models and in testing for cointegration. We discuss the bounds cointegration test proposed by Pesaran, Shin, and Smith (2001, Journal of Applied Econometrics 16: 289–326), which we have adapted into a command. Because the resulting models can be dynamically complex, we follow the advice of Philips (2018, American Jour- nal of Political Science 62: 230–244) by introducing a flexible command designed to dynamically simulate and plot a variety of types of autoregressive distributed lag models, including error-correction models. Keywords: dynamac, pssbounds, dynardl, cointegration, dynamic modeling, autoregressive distributed lag, error correction File-URL: http://www.stata-journal.com/article.html?article=st0545 File-Function: link to article purchase Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj18-4/st0545/ Handle:RePEc:tsj:stataj:v:18:y:2018:i:4:p:902-923 Template-Type: ReDIF-Article 1.0 Author-Name: Shawn Bauldry Author-Workplace-Name: Purdue University Author-Email: sbauldry@purdue.edu Author-Name: Jun Xu Author-Workplace-Name: Ball State University Author-Email: jxu@bsu.edu Author-Name: Andrew S. Fullerton Author-Workplace-Name: Oklahoma State University Author-Email: andrew.fullerton@okstate.edu Title: gencrm: A new command for generalized continuation-ratio modelsJournal: Stata Journal Pages: 924-936 Issue: 4 Volume: 18 Year: 2018 Month: December Abstract: A continuation-ratio model represents a variant of an ordered regres- sion model that is suited to modeling processes that unfold in stages, particularly those in which a return to a previous stage is not possible (for example, educational attainment, job promotion, or disease progression). The parameters for covariates in continuation-ratio models may be constrained to be equal, vary by a set of common factors (that is, proportionality constraints), or freely vary across stages. Currently, there are three community-contributed commands that fit continuation- ratio models. Each of these commands fits some subset of continuation-ratio mod- els involving parameter constraints, but none of them offer complete coverage of the range of possibilities. The new gencrm command expands the options for continuation-ratio models to include the possibility for some of or all the covari- ates to be constrained to be equal, to freely vary, or to vary by a set of common factors across stages. gencrm relies on Stata’s maximum likelihood routines for estimation and avoids reshaping the data. gencrm includes options for three link functions (logit, probit, and cloglog) and supports Stata’s multiple-imputation suites of commands. Keywords: gencrm, generalized continuation-ratio models, stage models, sequential logit models, stopping-ratio models File-URL: http://www.stata-journal.com/article.html?article=st0546 File-Function: link to article purchase Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj18-4/st0546/ Handle:RePEc:tsj:stataj:v:18:y:2018:i:4:p:924-936 Template-Type: ReDIF-Article 1.0 Author-Name: Denis Chetverikov Author-Workplace-Name: University of California, Los Angeles Author-Email: chetverikov@econ.ucla.edu Author-Name: Dongwoo Kim Author-Workplace-Name: University College London Author-Email: dongwoo.kim.13@ucl.ac.uk Author-Name: Daniel Wilhelm Author-Workplace-Name: University College London Author-Email: d.wilhelm@ucl.ac.uk Title: Nonparametric instrumental-variable estimation Journal: Stata Journal Pages: 937-950 Issue: 4 Volume: 18 Year: 2018 Month: December Abstract: In this article, we introduce the commands npiv and npivcv, which implement nonparametric instrumental-variable (NPIV) estimation methods without and with a cross-validated choice of tuning parameters, respectively. Both com- mands can impose the constraint that the resulting estimated function is mono- tone. Using such a shape restriction may significantly improve the performance of the NPIV estimator (Chetverikov and Wilhelm, 2017, Econometrica 85: 1303– 1320) because the ill-posedness of the NPIV estimation problem leads to uncon- strained estimators that suffer from particularly poor statistical properties such as high variance. However, the constrained estimator that imposes the monotonicity significantly reduces variance by removing nonmonotone oscillations of the esti- mator. We provide a small Monte Carlo experiment to study the estimators’ finite-sample properties and an application to the estimation of gasoline demand functions. Keywords: npiv, npivcv, nonparametric instrumental-variable estimation, shape restrictions, monotonicity, endogeneity, regression File-URL: http://www.stata-journal.com/article.html?article=st0547 File-Function: link to article purchase Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj18-4/st0547/ Handle:RePEc:tsj:stataj:v:18:y:2018:i:4:p:937-950 Template-Type: ReDIF-Article 1.0 Author-Name: Xiaoqing Ye Author-Workplace-Name: South-Central University for Nationalities Author-Email: yshtim@126.com Author-Name: Yixiao Sun Author-Workplace-Name: University of California, San Diego Author-Email: yisun@ucsd.edu Title: Heteroskedasticity- and autocorrelation-robust F and t tests in Stata Journal: Stata Journal Pages: 951-980 Issue: 4 Volume: 18 Year: 2018 Month: December Abstract: In this article, we consider time-series, ordinary least-squares, and instrumental-variable regressions and introduce a new pair of commands, har and hart, that implement more accurate heteroskedasticity- and autocorrelation- robust (HAR) F and t tests. These tests represent part of the recent progress on HAR inference. The F and t tests are based on the convenient F and t ap- proximations and are more accurate than the conventional chi-squared and normal approximations. The underlying smoothing parameters are selected to target the type I and type II errors, which are the two fundamental objects in every hypoth- esis testing problem. The estimation command har and the postestimation test command hart allow for both kernel HAR variance estimators and orthonormal- series HAR variance estimators. In addition, we introduce another pair of new commands, gmmhar and gmmhart, that implement the recently developed F and t tests in a two-step generalized method of moments framework. For these com- mands, we opt for the orthonormal-series HAR variance estimator based on the Fourier bases because it allows us to develop convenient F and t approximations as in the first-step generalized method of moments framework. Finally, we present several examples to demonstrate these commands. Keywords: har, hart, gmmhar, gmmhart, heteroskedasticity- and auto- correlation-robust inference, fixed-smoothing, kernel function, orthonormal series, testing-optimal, AMSE, OLS/IV, two-step GMM, J statistic File-URL: http://www.stata-journal.com/article.html?article=st0548 File-Function: link to article purchase Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj18-4/st0548/ Handle:RePEc:tsj:stataj:v:18:y:2018:i:4:p:951-980 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: Seven steps for vexatious string variables Journal: Stata Journal Pages: 981-994 Issue: 4 Volume: 18 Year: 2018 Month: December Abstract: String variables that seemingly should be numeric require some care. The column provides a step-by-step guide explaining how to convert them or—as the case may merit—to leave them as they are. Dates in string form, identifiers and categorical variables, and pure numeric content trapped in string form need different actions. Practical advice on good and not so good technique is sprinkled throughout. Keywords: string variables, numeric variables, dates, encode, egen, destring File-URL: http://www.stata-journal.com/article.html?article=dm0098 File-Function: link to article purchase Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj18-3/dm0098/ Handle:RePEc:tsj:stataj:y:18:y:2018:i:4:p:981-994 Template-Type: ReDIF-Article 1.0 Author-Name: Patrick Royston Author-Workplace-Name: MRC Clinical Trials Unit Author-Email: j.royston@ucl.ac.uk Title: Power and sample-size analysis for the Royston–Parmar combined test in clinical trials with a time-to-event outcome: Correction and program update Journal: Stata Journal Pages: 995-996 Issue: 4 Volume: 18 Year: 2018 Month: December Abstract: The changes made to Royston (2018) and to power_ct are i) in sec- tion 2.4 (Sample-size calculation for the combined test), to replace ordinary least- squares (OLS) regression using regress with grouped probit regression using glm; ii) in section 4 (Examples), to revisit the worked examples of sample-size estima- tion in light of the revised estimation procedure; and iii) to update the help file entry for the option n(numlist). The updated software is version 1.2.0. Keywords: power_ct, update, randomized controlled trial, time-to-event outcome, restricted mean survival time, log-rank test, Cox test, combined test, treatment effect, hypothesis testing, flexible parametric model File-URL: http://www.stata-journal.com/article.html?article=st0510_1 File-Function: link to article purchase Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj18-4/st0510_1/ Handle:RePEc:tsj:stataj:v:18:y:2018:i:4:p:995-996 Template-Type: ReDIF-Article 1.0 Author-Name: Editors Author-Email: editors@stata.com Title: Software updates Journal: Stata Journal Pages: 997 Issue: 4 Volume: 18 Year: 2018 Month: December Abstract: Updates for previously published packages are provided. Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj18-4/st0097_2/ Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj18-4/st0468_1/ Note: Windows users should not attempt to download these files with a web browser. Handle:RePEc:tsj:stataj:v:18:y:2018:i:4:p:997