Template-Type: ReDIF-Article 1.0 Author-Name: David Roodman Author-Workplace-Name: Open Philanthropy Project Author-Email: david.roodman@openphilanthropy.org Author-Person: pro120 Author-Name: James G. MacKinnon Author-Workplace-Name: Queen’s University Author-Email: jgm@econ.queensu.ca Author-Person: pma63 Author-Name: Morten Ørregaard Nielsen Author-Workplace-Name: Queen’s University Author-Email: mon@econ.queensu.ca Author-Person: pni42 Author-Name: Matthew D. Webb Author-Workplace-Name: Carleton University Author-Email: matt.webb@carleton.ca Author-Person: pwe297 Title: Fast and wild: Bootstrap inference in Stata using boottest Journal: Stata Journal Pages: 4-60 Issue: 1 Volume: 19 Year: 2019 Month: March X-DOI: 10.1177/1536867X19830877 Abstract: The wild bootstrap was originally developed for regression models with heteroskedasticity of unknown form. Over the past 30 years, it has been extended to models estimated by instrumental variables and maximum likelihood and to ones where the error terms are (perhaps multiway) clustered. Like boot- strap methods in general, the wild bootstrap is especially useful when conventional inference methods are unreliable because large-sample assumptions do not hold. For example, there may be few clusters, few treated clusters, or weak instruments. The package boottest can perform a wide variety of wild bootstrap tests, often at remarkable speed. It can also invert these tests to construct confidence sets. As a postestimation command, boottest works after linear estimation commands, in- cluding regress, cnsreg, ivregress, ivreg2, areg, and reghdfe, as well as many estimation commands based on maximum likelihood. Although it is designed to perform the wild cluster bootstrap, boottest can also perform the ordinary (non- clustered) version. Wrappers offer classical Wald, score/Lagrange multiplier, and Anderson–Rubin tests, optionally with (multiway) clustering. We review the main ideas of the wild cluster bootstrap, offer tips for use, explain why it is particularly amenable to computational optimization, state the syntax of boottest, artest, scoretest, and waldtest, and present several empirical examples. Keywords: boottest, artest, waldtest, scoretest, Anderson–Rubin test, Wald test, wild bootstrap, wild cluster bootstrap, score bootstrap, multiway clustering, few treated clusters File-URL: http://hdl.handle.net/10.1177/1536867X19830877 Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj19-1/st0549/ Handle:RePEc:tsj:stataj:v:19:y:2019:i:1:p:4-60 Template-Type: ReDIF-Article 1.0 Author-Name: E.F. Haghish Author-Workplace-Name: University of Göttingen Author-Email: haghish@med.uni-goettingen.de Title: Seamless interactive language interfacing between R and Stata Journal: Stata Journal Pages: 61-82 Issue: 1 Volume: 19 Year: 2019 Month: March X-DOI: 10.1177/1536867X19830891 Abstract: In this article, I propose a new approach to language interfacing for statistical software by allowing automatic interprocess communication between R and Stata. I advocate interactive language interfacing in statistical software by automatizing data communication. I introduce the rcall package and provide examples of how the R language can be used interactively within Stata or embed- ded into Stata programs using the proposed approach to interfacing. Moreover, I discuss the pros and cons of object synchronization in language interfacing. Keywords: rcall, rcall check, language interfacing, interprocess communication, synchronization, statistical programming, reproducible research File-URL: http://hdl.handle.net/10.1177/1536867X19830891 Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj19-1/pr0069/ Handle:RePEc:tsj:stataj:v:19:y:2019:i:1:p:61-82 Template-Type: ReDIF-Article 1.0 Author-Name: E.F. Haghish Author-Workplace-Name: University of Göttingen Author-Email: haghish@med.uni-goettingen.de Title: On the importance of syntax coloring for teaching statistics Journal: Stata Journal Pages: 83-86 Issue: 1 Volume: 19 Year: 2019 Month: March X-DOI: 10.1177/1536867X19830891 Abstract: In this article, I underscore the importance of syntax coloring in teaching statistics. I also introduce the statax package, which includes JavaScript and LATEX programs for highlighting Stata code in HTML and LATEX documents. Furthermore, I provide examples showing how to implement this package for de- veloping educational materials on the web or for a classroom handout. Keywords: statax, syntax highlighting, statistical education, JavaScript, LATEX File-URL: http://hdl.handle.net/10.1177/1536867X19830891 Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj19-1/pr0070/ Handle:RePEc:tsj:stataj:v:19:y:2019:i:1:p:83-86 Template-Type: ReDIF-Article 1.0 Author-Name: Alfonso Sánchez-Peñalver Author-Workplace-Name: University of South Florida Author-Email: alfonso.statalist@gmail.com Title: Estimation methods in the presence of corner solutions Journal: Stata Journal Pages: 87-111 Issue: 1 Volume: 19 Year: 2019 Month: March X-DOI: 10.1177/1536867X19830893 Abstract: In this article, I introduce a new command, nehurdle, that collects maximum likelihood estimators for linear, exponential, homoskedastic, and het- eroskedastic tobit; truncated hurdle; and type II tobit models that involve ex- plained variables with corner solutions. I review what a corner solution is as well as the assumptions of the mentioned models. Keywords: nehurdle, two-part, truncated hurdle, tobit, heckman, type II tobit, corner solutions, hurdle estimation File-URL: http://hdl.handle.net/10.1177/1536867X19830893 Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj19-1/st0550/ Handle:RePEc:tsj:stataj:v:19:y:2019:i:1:p:87-111 Template-Type: ReDIF-Article 1.0 Author-Name: Maciej Jakubowski Author-Workplace-Name: University of Warsaw Author-Email: mjakubowski@uw.edu.pl Author-Name: Artur Pokropek Author-Workplace-Name: Polish Academy of Sciences Author-Email: artur.pokropek@gmail.com Title: piaactools: A program for data analysis with PIAAC data Journal: Stata Journal Pages: 112-128 Issue: 1 Volume: 19 Year: 2019 Month: March X-DOI: 10.1177/1536867X19830909 Abstract: The OECD Programme for the International Assessment of Adult Competencies (PIAAC) is currently the only international survey of adult skills. It provides rich data on skills, work and life situations, earnings, and attitudes. To en- sure representativeness and high reliability, the study is based on a complex survey design and advanced statistical methods. To obtain correct results from publicly available microdata, one must use special methods that are often too advanced for less experienced researchers. In this article, we present piaactools—a pack- age of three commands that facilitate analysis with PIAAC data. The command piaacdes calculates basic statistics, piaactab computes frequencies of adults at each proficiency level, and piaacreg allows for the use of several regression models with PIAAC data. Output is saved as HTML files that can be opened in most spreadsheets and as Stata matrices that can be further processed in Stata. We also explain how to use these commands and provide examples that can be easily modified for use with different models and variables. Keywords: piaactools, piaacdes, piaactab, piaacreg, PIAAC, OECD, regression, plausible values, replicate weights, adult survey, skills, proficiency, education File-URL: http://hdl.handle.net/10.1177/1536867X19830909 Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj19-1/st0551/ Handle:RePEc:tsj:stataj:v:19:y:2019:i:1:p:112-128 Template-Type: ReDIF-Article 1.0 Author-Name: Carlo Schwarz Author-Workplace-Name: University of Warwick Author-Email: c.r.schwarz@warwick.ac.uk Title: lsemantica: A command for text similarity based on latent semantic analysis Journal: Stata Journal Pages: 129-142 Issue: 1 Volume: 19 Year: 2019 Month: March X-DOI: 10.1177/1536867X19830910 Abstract: In this article, I present the lsemantica command, which implements latent semantic analysis in Stata. Latent semantic analysis is a machine learning algorithm for word and text similarity comparison and uses truncated singular value decomposition to derive the hidden semantic relationships between words and texts. lsemantica provides a simple command for latent semantic analysis as well as complementary commands for text similarity comparison. Keywords: lsemantica, machine learning, latent semantic analysis, latent semantic indexing, truncated singular value decomposition, text analysis, text similarity File-URL: http://hdl.handle.net/10.1177/1536867X19830910 Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj19-1/st0552/ Handle:RePEc:tsj:stataj:v:19:y:2019:i:1:p:129-142 Template-Type: ReDIF-Article 1.0 Author-Name: Stanislav Kolenikov Author-Workplace-Name: Abt Associates Author-Email: stas.kolenikov@abtassoc.com Title: Updates to the ipfraking ecosystem Journal: Stata Journal Pages: 143-184 Issue: 1 Volume: 19 Year: 2019 Month: March X-DOI: 10.1177/1536867X19830891 Abstract: Kolenikov (2014, Stata Journal 14: 22–59) introduced the package ipfraking for iterative proportional fitting (raking) weight-calibration procedures for complex survey designs. In this article, I briefly describe the original package and updates to the core program and document additional programs that are used to support the process of creating survey weights in the author’s production code. Keywords: ipfraking, ipfraking report, whatsdeff, totalmatrices, mat2do, xls2row, wgtcellcollapse define, wgtcellcollapse sequence, wgtcellcollapse report, wgtcellcollapse candidate, wgtcellcollapse collapse, survey, svy, calibration, raking, weights, iterative proportional fitting File-URL: http://hdl.handle.net/10.1177/1536867X19830891 Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj19-1/st0323_1/ Handle:RePEc:tsj:stataj:v:19:y:2019:i:1:p:143-184 Template-Type: ReDIF-Article 1.0 Author-Name: Constantin Ruhe Author-Workplace-Name: Goethe University Frankfurt Author-Email: Ruhe@soz.uni-frankfurt.de Title: Bootstrap pointwise confidence intervals for covariate-adjusted survivor functions in the Cox model Journal: Stata Journal Pages: 185-199 Issue: 1 Volume: 19 Year: 2019 Month: March X-DOI: 10.1177/1536867X19830915 Abstract: Survival functions are a common visualization of predictions from the Cox model. However, neither Stata’s stcurve command nor the community-contributed scurve tvc command allows one to estimate confidence intervals. In this article, I discuss how bootstrap confidence intervals can be formed for covariate-adjusted survival functions in the Cox model. The new bsurvci com- mand automates this procedure and allows users to visualize the results. bsurvci enables one to estimate uncertainty around survival functions estimated from Cox models with time-varying coefficients, a capability that was not previously avail- able in Stata. Furthermore, it provides Stata users with an additional option for survival estimates from Cox models with proportional hazards by allowing them to choose between bootstrap confidence intervals using bsurvci and asymptotic confidence intervals from an existing community-contributed command, survci. Because asymptotic confidence intervals make distributional assumptions when constructing confidence intervals, the bootstrap procedure proposed in this article provides a nonparametric alternative. Keywords: bsurvci, scurve tvc, stcox, tvc(), survci, confidence intervals, bootstrap, Cox model, proportional hazards, time-varying coefficients, survival function File-URL: http://hdl.handle.net/10.1177/1536867X19830915 Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj19-1/gr0076/ Handle:RePEc:tsj:stataj:v:19:y:2019:i:1:p:185-199 Template-Type: ReDIF-Article 1.0 Author-Name: Mehmet F. Dicle Author-Workplace-Name: Loyola University New Orleans Author-Email: mfdicle@gmail.com Title: Candle charts for financial technical analysis Journal: Stata Journal Pages: 200-209 Issue: 1 Volume: 19 Year: 2019 Month: March X-DOI: http://hdl.handle.net/10.1177/1536867X19830918 Abstract: Technical analysis is an important part of financial industry, research, and teaching. The methodology has two parts: i) calculation of the individual tools and ii) visual representations. In this article, I provide a community-contributed command, candlechart, to draw the most common technical analysis charts. My intent is to draw these charts similarly to industry examples. The popular can- dle price chart is combined with charts for volume, moving-average convergence divergence, relative strength index, and Bollinger bands. Keywords: candlechart, technical analysis, candle chart, volume, moving- average convergence divergence, relative strength index, Bollinger bands File-URL: http://hdl.handle.net/10.1177/1536867X19830918 Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj19-1/gr0076/ Handle:RePEc:tsj:stataj:v:19:y:2019:i:1:p:200-209 Template-Type: ReDIF-Article 1.0 Author-Name: Matias Cattaneo Author-Workplace-Name: University of Michigan Author-Email: cattaneo@umich.edu Author-Name: Rocio Titiunik Author-Workplace-Name: University of Michigan Author-Email: titiunik@umich.edu Author-Name: Gonzalo Vazquez-Bare Author-Workplace-Name: University of California, Santa Barbara Author-Email: gvazquez@econ.ucsb.edu Title: Power calculations for regression-discontinuity designs Journal: Stata Journal Pages: 210-245 Issue: 1 Volume: 19 Year: 2019 Month: March X-DOI: 10.1177/1536867X19830919 Abstract: In this article, we introduce two commands, rdpow and rdsampsi, that conduct power calculations and survey sample selection when using local polyno- mial estimation and inference methods in regression-discontinuity designs. rdpow conducts power calculations using modern robust bias-corrected local polynomial inference procedures and allows for new hypothetical sample sizes and bandwidth selections, among other features. rdsampsi uses power calculations to compute the minimum sample size required to achieve a desired level of power, given estimated or user-supplied bandwidths, biases, and variances. Together, these commands are useful when devising new experiments or surveys in regression-discontinuity designs, which will later be analyzed using modern local polynomial techniques for estimation, inference, and falsification. Because our commands use the community- contributed (and R) package rdrobust for the underlying bandwidths, biases, and variances estimation, all the options currently available in rdrobust can also be used for power calculations and sample-size selection, including preintervention covariate adjustment, clustered sampling, and many bandwidth selectors. Finally, we also provide companion R functions with the same syntax and capabilities. Keywords: rdpow, rdsampsi, regression-discontinuity designs, power calculations, local polynomial methods File-URL: http://hdl.handle.net/10.1177/1536867X19830919 Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj19-1/st0554/ Handle:RePEc:tsj:stataj:v:19:y:2019:i:1:p:210-245 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: How best to generate indicator or dummy variables Journal: Stata Journal Pages: 246-259 Issue: 1 Volume: 19 Year: 2019 Month: March X-DOI: 10.1177/1536867X19830921 Abstract: Indicator or dummy variables record whether some condition is true or false in each observation by a value of 1 or 0. Values may also be missing if truth or falsity is not known, and that fact should be flagged. Such indicators may be created on the fly by using factor-variable notation. tabulate also offers one method for automating the generation of indicators. In this column, we discuss in detail how otherwise to best generate such variables directly, with comments here and there on what not to do. Keywords: indicator variable, dummy variable, true or false, any, all, missing values, logical and relational operators, functions, merge File-URL: http://hdl.handle.net/10.1177/1536867X19830921 Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj18-3/dm0099/ Handle:RePEc:tsj:stataj:y:19:y:2019:i:1:p:246-259 Template-Type: ReDIF-Article 1.0 Author-Name: Editors Author-Email: editors@stata.com Title: Software updates Journal: Stata Journal Pages: 260 Issue: 1 Volume: 19 Year: 2019 Month: March Abstract: Updates for previously published packages are provided. Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj19-1/gr41_5/ Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj19-1/st0503_1/ Note: Windows users should not attempt to download these files with a web browser. Handle:RePEc:tsj:stataj:v:19:y:2019:i:1:p:260