Day 1
Thursday 11 September
-
10:00 am
Welcome
Scientific Organisers
-
10:20 am
Resultssets to resultstables revisited
Roger Newson
Queen Mary University, London
A resultsset is a dataset created as output by a Stata command. Multiple resultssets can be appended or merged or combined in other ways to make secondary resultssets. However, their usefulness is in that they can be converted to resultsplots and/or resultstables in documents in a variety of formats. We focus on resultstables in .docx documents. Converting resultssets to resultstables starts with decoding (using sdecode and its family of dependent packages) and ends with listing decoded variables to a document (using docxtab or listtab). However, intermediate steps may include reshapeing (long or wide), appending, merging, characterizing (to define column headers), inserting gap observations, and/or grouping rows into pages in multipage tables. We illustrate this process using an example, outputting a multi-page table to a .docx document, and introcucing the ltop package for grouping lines into pages..
-
10:40 am
Stata to Excel: From do-file to VBA
James Pike
Adelphi Real World
The introduction of Stata’s putexcel command enhanced the integration between Stata and Excel, allowing users to export formatted results directly from one to the other. Via putexcel, complex outputs and spreadsheets are possible without copy-pasting or manual formatting. For many tasks, putexcel streamlines workflows and saves time. However, putexcel has limits. Some Excel features, such as conditional formatting, autofit of cells, text to columns, or removing excess formatting, cannot be performed. However, Excel’s own language, Visual Basic for Applications (VBA), enables automation options that go beyond Stata’s scope. Using putexcel and then VBA in Excel often means running a do file and then opening the resulting Excel file in Excel to run VBA macros. We present a method of automation where we use Stata to write and execute VBA code via a Visual Basic Script (VBS) file. By generating a .vbs script from within Stata (using the file command) and running it (with the shell command), users can automate Excel tasks that require VBA, all in the comfort of the Stata environment. This approach creates new possibilities for a streamlined workflow.
-
11:00 am
Conditional average treatment-effects estimation using Stata
Di Liu
StataCorp
Treatment effects estimate the causal effects of a treatment on an outcome. The effect may be heterogeneous. Average treatment effects conditional on a set of variables (CATEs) help us understand heterogeneous treatment effects. By construction, they are useful to evaluate how different treatment-assignment policies affect different groups in the population.
In this talk, we will show how to use Stata 19's new command cate to answer questions such as the following:
1. Are the treatment effects heterogeneous?
2. How do the treatment effects vary with some variables?
3. Do the treatment effects vary across prespecified groups?
4. Are there unknown groups in the data for which treatment effects differ?
5. Which is best among possible treatment-assignment rules? -
12:00 pm
Lunch
-
13:00 pm
Data reduction for graphical and other purposes
Nicholas Cox
Durham University
Reducing a dataset to another dataset containing summary or other statistics is an old problem, much addressed in Stata by official commands such as collapse, contract or statsby and by various community-contributed commands. Often an underlying principle is that a valuable command should do one thing well, so that a reduction command is just one step in a sequence that includes other analyses. This presentation focuses on a bundle of new commands recently posted on SSC, cisets, momentsets, pctilesets, and lmomentsets. They have much in common, including support for obtaining results for multiple variables and for distinct groups of a single variable. Typically the next stage is some graphical representation, such as a customised variation on existing designs. Examples of their use will be coupled with ruminations on the trade-offs in command design, for programmers and users alike, between versatility and simplicity. As in the rest of life, sometimes programmers need to step back before they can move forward in a better direction.
-
13:30 pm
Using LOCPROJ to easily estimate nonlinear local projections
Alfonso Ugarte-Ruiz
BBVA Research
We review all the possible alternatives of specifying nonlinear impulse response functions (IRF) through local-projections that are available using the user-written command LOCPROJ. For instance, the command allows easily specifying shocks that include basic non-linearities such as state-dependent impacts, quadratic effects, interactions between continuous variables, etc. Moreover, it allows non-linearities in the dependent variable, such as when we are interested in estimating the response of the probability of a binary outcome, or when we want to uncover nonlinear effects of a shock by letting the parameters of the local projection regressions vary across the conditional distribution of the dependent variable through the use of quantile regression. We explain how to use all the available options in LOCPROJ to accommodate all these different methodological alternatives and discuss the advantages that the command offers, for instance, that the command facilitates introducing lags of the dependent or the shock variables when using the Stata command QREG, which in principle does not allow time-series operators.
-
14:00 pm
Testing and Estimating Structural Breaks in Time Series and Panel Data in Stata
Jan Ditzen
Free University of Bozen-Bolzano
Identifying structural change is a crucial step in analysis of time series and panel data. The longer the time span, the higher the likelihood that the model parameters have changed as a result of major disruptive events, such as the 2007–2008 financial crisis and the 2020 COVID–19 outbreak. Detecting the existence of breaks, and dating them is therefore necessary, not only for estimation purposes but also for understanding drivers of change and their effect on relationships. This talk will introduce an updated version of xtbreak and discuss use, options and capabilities of xtbreak. First, the relevant econometric theory will be revisited followed by empirical examples. Emphasis will be put on challenges using xtbreak in panel data, how to interpret results and speed improvements using Python.
-
14:30 pm
Spatial Unit Roots in Regressions
David Boll
University of Warwick
Spatial unit roots can lead to spurious regression results. We present a brief overview of the methods developed in Müller and Watson (2024) to test for and correct for spatial unit roots. We also introduce a suite of Stata commands (-spur-) implementing these techniques. Our commands exactly replicate results in Müller and Watson (2024) using the same Chetty et al. (2014) data. We present a brief practitioner’s guide for applied researchers.
-
14:50 pm
Tea/Coffee Break
-
15:20 pm
Seamless Multi-Arm Multi-Stage (MAMS) designs with treatment selection and interim change of outcome: An update to nstage
Yumeng Liu
University College London
Multi-Arm Multi-Stage (MAMS) selection designs, as an extension of the standard MAMS designs, offer additional efficiencies that accelerate the evaluation of medical interventions in clinical trials. Standard MAMS designs use stagewise hypothesis testing to compare multiple experimental treatments against a common control at interim analyses, enabling early stopping for overwhelming efficacy or lack-of-benefit. MAMS selection designs further incorporate predefined rules to choose the best-performing treatments. Incorporating intermediate outcomes, introduced to significantly shorten the timing of interim analyses, naturally fits into the seamless trial design framework, which allows for outcome changes at early stages of trial. Our existing "nstage" suite of commands calculates target sample sizes for MAMS designs with binary outcomes such as death or disease progression. The program also projects timelines for trial planning and computes overall operating characteristics (overall pairwise/familywise type I error rates, power, and expected sample sizes). We have enhanced the program to support interim outcome changing and the interim rules for treatment selection, lack of benefit, and overwhelming efficacy. The updated nstage command is now more flexible, enabling changes to trial outcomes at interim stages, making it well-suited for seamless Phase II/III trial designs. It also supports treatment selection based on either Phase II (intermediate) or Phase III (primary clinical) outcomes. We will describe the new MAMS design and the associated Stata command using a miscarriage MAMS platform trial in maternal health.
-
15:50 pm
RAMPE: Randomisation Allocation Method Performance Evaluation
Cydney Bruce
University of Nottingham
When designing and conducting a randomised controlled trial, there are a variety of randomisation methods to choose from, but limited evidence on the performance of the methods under specific study designs. The RAMPE package contains 12 metrics designed to measure the balance and predictability of randomisation sequences in Stata. This will allow researchers to easily compare method performance using data that mirrors the specific trial that is being designed. Balance metrics: Measured both as the greatest imbalance observed throughout recruitment, and the final imbalance once the target sample size is achieved. groupimbalance: Measures the imbalance between the expected and observed ratio of participants in each treatment group. charimbalance: Measures the greatest imbalance observed across a set of covariates and the average imbalance across covariates. Predictability metrics: Measured as the proportion of correct guesses for a variety of prediction strategies. This is calculated for the whole sequence and assuming that recruiting sites only have information about previous allocations at their own site. alternation Recruiter assumes the next allocation is the one least recently allocated. backtheloser: Recruiter assumes the next allocation is the one with the fewest previous allocations. predbalance: Recruiter assumes the next allocation is the group with the smallest marginal total across randomisation covariates. In this talk, I will describe each of the developed metrics in more detail, discuss the interpretation of each metric and demonstrate with an example how this package can be used in practice.
-
16:20 pm
Optimal Policy Learning for Multi-Action Treatment and Risk Preference
Giovanni Cerulli
CNR-IRCRES
I present opl_ma_fb and opl_ma_vf, two community-distributed Stata command implementing first-best Optimal Policy Learning (OPL) algorithm to estimate the best treatment assignment given the observation of an outcome, a multi-action (or multi-arm) treatment, and a set of observed covariates (features). It allows for different risk preferences in decision-making (i.e., risk-neutral, risk- averse linear, risk-averse quadratic), and provide graphical representation of the optimal policy, along with an estimate of the maximal welfare (i.e., the value- function estimated at optimal policy). A practical example of the use of these commands is provided.
-
17:30 pm
Drinks Reception
-
19:00 pm
Conference Dinner (Optional)
Validate your login
Sign In
Create New Account