An Introduction to Stata for Health Researchers

Comments from the previous edition.

 

Svend Juul and Morten Frydenberg’s An Introduction to Stata for Health Researchers, Fourth Edition is distinguished in its careful attention to detail. The reader will learn not only the skills for statistical analysis but also the skills to make the analysis reproducible. The authors use a friendly, down-to-earth tone and include tips gained from a lifetime of collaboration and consulting.

 

The book is based on the assumption that the reader has some basic knowledge of statistics but no knowledge of Stata. The authors build the reader’s abilities as a builder would build a house: laying a firm foundation in Stata, framing a general structure in which good work can be accomplished, adding the details that are particular to various types of statistical analyses, and, finally, trimming with a thorough treatment of graphics and special topics such as power and sample-size computations.

 

Juul and Frydenberg start not only by teaching the reader how to communicate with Stata through its unified syntax but also by demonstrating how Stata thinks about its basic building blocks. The authors show how Stata views data, thus allowing the reader to see the variety of possible data structures. They also show how to manipulate data to create a dataset that is well documented. When demonstrating analysis techniques, the authors show how to think of analysis in terms of estimation and postestimation. They make the book easy to use as a learning tool and easy to refer back to for useful techniques.

 

Once they introduce Stata to new users, Juul and Frydenberg fill in the details for performing analysis in Stata. As would be expected from a book addressing health researchers, the authors mostly demonstrate the statistical techniques that are common in biostatistics and epidemiology: case–control, matched case–control, and incidence-rate data analysis; linear and generalized linear models, including logistic, Poisson, and binomial regression; survival analysis with proportional hazards; and classification using receiver operating characteristic curves. While presenting general estimation techniques, the authors also spend time with interactions and techniques for checking model assumptions.

 

While teaching Stata implementation, Juul and Frydenberg reinforce habits that allow reproducible research and graceful backtracking in case of errors. Early in the book, they introduce how to use do-files for creating sequences and log files for tracking work. At the end of the book, they introduce some useful programming techniques, such as loops and branching, that simplify repetitive tasks.

 

The fourth edition has been substantially revised based on new features in Stata 12 and Stata 13. The updated material has been streamlined while including new features in Stata.

List of tables
List of figures
Preface to the fifth edition (PDF)
Preface to the first edition (PDF)
Online supplements
Notations in this book

 

I THE BASICS 

 

GETTING STARTED

Installing and updating Stata
Starting and exiting Stata
Windows in Stata
Issuing commands
Managing output
Stata file types and names
Keyboard shortcuts

 

GETTING HELP-AND MORE

The help and search commands
The complete Stata manuals
Other resources

 

COMMAND SYNTAX

General syntax rules
Syntax diagrams
Lists of variables and numbers
Qualifiers
Weights
Options
Prefixes
Other syntax elements
Version control
Commands that influence program flow
Errors and error messages

 

II DATA MANAGEMENT

 

VARIABLES

Numeric formats
Missing values
Storage types and precision
Date and time variables
String variables
Memory considerations

 

GETTING DATA IN AND OUT OF STATA

Opening and saving Stata data
Entering data
Exchanging data with other programs

 

ADDING EXPLANATORY TEXT TO DATA

Variable and value labels
Dataset label and notes

 

CALCULATIONS

Generate and replace
Operators and functions in calculations
The egen command
Recoding variables
Checking correctness of calculations
Giving numbers to observations

 

COMMANDS AFFECTING DATA STRUCTURE

Selecting observations and variables
Renaming and reordering variables
Sorting data
Combining files
Reshaping data

 

TAKING GOOD CARE OF YOUR DATA

Folders, filenames, variable names, and labels
Data management
Analysis
Protect your data

 

III ANALYSIS

 

DESCRIPTION AND SIMPLE ANALYSIS

Overview of a dataset
Listing observations
Simple tables for categorical variables
Analyzing binary variables
Analyzing continuous variables
Finding confidence intervals
Immediate commands

 

REGRESSION ANALYSIS

Linear regression
Regression postestimation
Categorical predictors—factor variables
Interactions in regression models
Logistic regression
Other regression models
Nonindependent observations
Bootstrapping

 

TIME-TO-EVENT DATA

Setting the time scale and event: The stset command
The Kaplan–Meier survival function
Tabulating rates
Cox proportional hazards regression
Preparing data for advanced survival analyses
Advanced survival modeling
Poisson regression

 

POWER, PRECISION, AND SAMPLE-SIZE ANALYSIS 
Power analysis
Precision analysis
Power by simulation—A superiority study

 

MEASUREMENT AND DIAGNOSIS

Comparing two measurements
Reproducibility of measurements
Using tests for diagnosis

 

MISCELLNEOUS

Random samples, simulations
Working with diagnoses
Preparing tables for publication
Including graphs in Word and PDF files
Profile.do changing the ado-path
Unicode and ASCII encoding of characters
Other analyses

 

IV GRAPHS

 

GRAPHS

Anatomy of a graph
Anatomy of graph commands
Graph size
Schemes
Graph options: Axes
Graph options: Text elements
Plot options: Markers, lines, etc.
Histograms and other distribution graphs
Twoway plots: scatterplots and line plots
Bar graphs
By-graphs and combined graphs
Saving and exporting graphs

 

V ADVANCED TOPICS

 

ADVANCED TOPICS

Using stored results
Macros and scalars
Some useful commands
Programs
Debugging programs

 

References

Download the datasets used in this book

 

Author: Svend Juul and Morten Frydenberg
Edition: Fifth Edition
ISBN-13: 978-1-59718-316-1
©Copyright: 2021
Versione e-Book disponibile

The book is based on the assumption that the reader has some basic knowledge of statistics but no knowledge of Stata. The authors build the reader’s abilities as a builder would build a house: laying a firm foundation in Stata, framing a general structure in which good work can be accomplished, adding the details that are particular to various types of statistical analyses, and, finally, trimming with a thorough treatment of graphics and special topics such as power and sample-size computations.