Tips - Stata: Conference Articles
Survey data analysis in Stata
Survey data analysis in Stata
Jeff Pitblado
StataCorp
In this presentation, I cover how to use Stata for survey data analysis assuming a fixed population. We will begin by reviewing the sampling methods used to collect survey data, and how they affect the estimation of totals, ratios, and regression coefficients. We will then cover the three variance estimators implemented in Stata’s survey estimation commands. Strata with a single sampling unit, certainty sampling units, subpopulation estimation, and poststratification will be also covered in some detail.
Additional informationca09_pitblado_presentation.pdf
ca09_pitblado_handout.pdf
ca09_pitblado_stata.zip
Additional informationca09_pitblado_presentation.pdf
ca09_pitblado_handout.pdf
ca09_pitblado_stata.zip
Graphics tricks for models
Bill Rising
StataCorp
Visualizing interactions and response surfaces can be difficult. In this talk, I will show how to do the former by graphing adjusted means and the latter by showing how to roll together contour plots. I will demonstrate this for both linear and nonlinear models.
Additional informationchi11_rising.pdf
chi11_rising_files.zip
Additional informationchi11_rising.pdf
chi11_rising_files.zip
Multiple imputation in Stata
Bill Rising
StataCorp LP
Multiple imputation is a method for trying to retrieve power lost by missing values in a dataset. In this session, I will demonstrate how the suite of mi commands introduced in Stata 11 can be used to impute data, estimate models, and pool results, as well as manage various forms of multiply imputed datasets.
Additional informationrising_sug.pdf
Additional informationrising_sug.pdf
Multiple imputation using Stata’s mi command
Yulia Marchenko
StataCorp
Stata’s mi command can be used to perform multiple-imputation analysis, including imputation, data management, and estimation. mi impute provides a number of univariate and multivariate imputation methods, including multivariate normal (MVN) data augmentation. mi estimate combines the estimation and pooling steps of the multiple-imputation procedure into one easy step. mi also provides an extensive ability to manage multiply imputed data. I give a brief overview of all of mi’s capabilities, with emphasis on mi impute and mi estimate, and I also demonstrate examples of some of mi’s unique data-management features.
Additional informationboston10_marchenko.pdf
Additional informationboston10_marchenko.pdf
Using the margins command to estimate and interpret adjusted predictions and marginal effects
Richard Williams
University of Notre Dame
As Long and Freese show, it can often be helpful to compute predicted and expected values for hypothetical or prototypical cases. Stata 11 introduced new tools—factor variables and the margins command—for making such calculations. These can do many of the things that were previously done by Stata’s own adjust and mfx commands, as well as Long and Freese’s spost9 commands like prvalue. Unfortunately, the complexity of the margins syntax, the daunting 50-page reference manual entry that describes it, and a lack of understanding about what margins offers over older commands may have dissuaded researchers from using it. This paper therefore shows how margins can easily replicate analyses done by older commands. It demonstrates how margins provides a superior means for dealing with interdependent variables (for example, X and X2; X1, X2, and X1 × X2; multiple dummies created from a single categorical variable), and is also superior for data that are svyset. The paper explains how the new asobserved option works and the substantive reasons for preferring it over the atmeans approach used by older commands. The paper primarily focuses on the computation of adjusted predictions, but also shows how margins has the same advantages for computing marginal effects.
Additional informationchi11_williams.pptx
Additional informationchi11_williams.pptx
Estimating partial effects using margins in Stata 11
David Drukker
StataCorp LP
This session introduces the use of the margins command to estimate the partial effects at the mean and the mean of the partial effects. Both the Stata syntax and the underlying statistical methods will be discussed. The presentation will also include some discussion of factor variables.
Additional informationdrukker_sug.pdf
Additional informationdrukker_sug.pdf
Thirty graphical tips Stata users should know
Nicholas J. Cox
Department of Geography, Durham University
Stata’s graphics were completely rewritten for Stata 8, with further key additions in later versions. Its official commands have, as usual, been supplemented by a variety of user-written programs. The resulting variety presents even experienced users with a system that undeniably is large, often appears complicated, and sometimes seems confusing. In this talk, I provide a personal digest of graphics strategy and tactics for Stata users emphasizing details large and small that, in my view, deserve to be known by all.
Additional informationUKSUG10.Cox.zip
Additional informationUKSUG10.Cox.zip
An overview of meta-analysis in Stata
A comprehensive range of user-written commands for meta-analysis is available in Stata and documented in detail in the recent book Meta-Analysis in Stata (Sterne, ed., 2009, [Stata Press]).The purpose of this session is to describe these commands, with a focus on recent developments and areas in which further work is needed. We will define systematic reviews and meta-analyses and will introduce the metan command, which is the main Stata meta-analysis command. We will distinguish between meta-analyses of randomized controlled trials and observational studies, and we will discuss the additional complexities inherent in systematic reviews of the latter.
Meta-analyses are often complicated by heterogeneity, variation between the results of different studies beyond that expected due to sampling variation alone. Meta-regression, implemented in the metareg command, can be used to explore reasons for heterogeneity, although its utility in medical research is limited by the modest numbers of studies typically included in meta-analyses and the many possible reasons for heterogeneity. Heterogeneity is a striking feature of meta-analyses of diagnostic-test accuracy studies. We will describe how to use the midas and metandi commands to display and meta-analyse the results of such studies.
Many meta-analysis problems involve combining estimates of more than one quantity: for example, treatment effects on different outcomes or contrasts among more than two groups. Such problems can be tackled using multivariate meta-analysis, implemented in the mvmeta command. We will describe how the model is fit, and when it may be superior to a set of univariate meta-analyses. Will will also illustrate its application in a variety of settings.
Additional informationUKSUG10.Sterne.pdf
UKSUG10.White.ppt
UKSUG10.Harbord.pdf
Meta-analyses are often complicated by heterogeneity, variation between the results of different studies beyond that expected due to sampling variation alone. Meta-regression, implemented in the metareg command, can be used to explore reasons for heterogeneity, although its utility in medical research is limited by the modest numbers of studies typically included in meta-analyses and the many possible reasons for heterogeneity. Heterogeneity is a striking feature of meta-analyses of diagnostic-test accuracy studies. We will describe how to use the midas and metandi commands to display and meta-analyse the results of such studies.
Many meta-analysis problems involve combining estimates of more than one quantity: for example, treatment effects on different outcomes or contrasts among more than two groups. Such problems can be tackled using multivariate meta-analysis, implemented in the mvmeta command. We will describe how the model is fit, and when it may be superior to a set of univariate meta-analyses. Will will also illustrate its application in a variety of settings.
Additional informationUKSUG10.Sterne.pdf
UKSUG10.White.ppt
UKSUG10.Harbord.pdf
Competing-risks regression in Stata 11
Roberto G. Gutierrez
StataCorp
Competing-risks survival regression provides a useful alternative to Cox regression in the presence of one or more competing risks. For example, say that you are studying the time from initial treatment for cancer to recurrence of cancer in relation to the type of treatment administered and demographic factors. Death is a competing event: The person under treatment may die, impeding the occurence of the event of interest, recurrence of cancer. Unlike censoring, which merely obstructs you from viewing the event, a competing event prevents the event of interest from occurring altogether. Depending on the scope of your statistical inference, your analysis may need to be adjusted for competing risks.
Stata’s new stcrreg command implements competing-risks regression based on Fine and Gray’s proportional subhazards model. In this talk, I focus on that new command and compare the method of Fine and Gray to a method based on directly modeling cause-specific hazards. Regardless of method, the focus is on estimating the cumulative incidence function (CIF) for the event of interest in the presence of competing events.
Additional informationboston10_gutierrez.pdf
Stata’s new stcrreg command implements competing-risks regression based on Fine and Gray’s proportional subhazards model. In this talk, I focus on that new command and compare the method of Fine and Gray to a method based on directly modeling cause-specific hazards. Regardless of method, the focus is on estimating the cumulative incidence function (CIF) for the event of interest in the presence of competing events.
Additional informationboston10_gutierrez.pdf
29 November 2010 Vince Wiggins, Vice President, Scientific Development 0 Comments
The fourth quarter Stata News came out today. Among other things, it contains an article by Bobby Gutierrez, StataCorp’s Director of Statistics, about competing risks survival analysis. If any of you are like me, conversant in survival analysis but not an expert, I think you will enjoy Bobby’s article. In a mere page and a half, I learned the primary differences between competing risks analysis and the Cox proportional hazards model and why I will sometimes prefer competing risks. Bobby’s article can be read at http://www.stata.com/news/statanews.25.4.pdf.