Stata Press books

An Introduction to Stata for Health Researchers, Second Edition

Svend Juul
Copyright 2008
ISBN-13: 978-1-59718-044-3
Pages: 361; paperback
Price $52.00
Third edition now available
See a larger photo of the front cover
See the back cover
Table of contents
Preface to the second edition (pdf)
Preface to the first edition (pdf)
Author index (pdf)
Subject index (pdf)
Errata
Other supplementary materials provided by the author
Download the datasets used in this book
Obtain answers to the exercises


Comment from the Stata technical group

Svend Juul’s An Introduction to Stata for Health Researchers, Second Edition is distinguished in its careful attention to detail. The reader will learn not only how to use Stata but also the skills needed to create the reproducible analyses so necessary in the field.

The book is based on the assumption that the reader has some basic knowledge of statistics but no knowledge of Stata. Juul builds 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, and finally filling in details that are particular to various types of statistical analysis.

Juul starts by teaching the reader how to communicate with Stata, not just through its unified syntax, but also by demonstrating how Stata thinks about its basic building blocks. Juul shows how Stata views data and graphics, allowing the reader to see the variety of possible data structures. He also shows how to manipulate the data to create a dataset that is well documented and how to create carefully crafted graphs. He makes the book easy to use as a learning tool and easy to refer back to for useful techniques.

Once he introduces Stata to the new user, Juul fills in the details for performing analysis in Stata. As would be expected from a book addressing health researchers, Juul demonstrates mostly the statistical techniques common in biostatistics and epidemiology: case–control and matched case–control data analysis, stratified or not; linear and generalized linear models, including logistic, Poisson, and binomial regression; survival analysis with both life tables and proportional hazards; and classification using receiver operating characteristic curves.

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


Table of contents

List of tables
List of figures
Preface to the second edition (PDF)
Preface to the first edition (PDF)
1 Getting started
1.1 Installing and updating Stata
1.2 Starting and exiting Stata
1.3 Customizing Stata (Windows)
1.4 Windows in Stata
1.5 Issuing commands
1.6 Managing output
1.7 Reusing commands
2 Getting help—and more
2.1 The manuals
2.2 Online help
2.3 Other resources
2.4 Errors and error messages
3 Stata file types and names
4 Command syntax
4.1 General syntax rules
4.2 Syntax diagrams
4.3 Lists of variables and numbers
4.4 Qualifiers
4.5 Weights
4.6 Options
4.7 Prefixes
4.8 Other syntax elements
4.9 Version control
5 Variables
5.1 Types of variables
5.2 Numeric formats
5.3 Missing values
5.4 Storage types and precision
5.5 Date and time variables
5.6 String variables
5.7 Memory considerations
6 Getting data in and out of Stata
6.1 Opening and saving Stata data
6.2 Entering data
6.3 Reading ASCII data
6.4 Exchanging data with other programs
7 Documentation commands
7.1 Labels
7.2 Working with labels: An example
8 Calculations
8.1 generate and replace
8.2 Operators and functions in calculations
8.3 Extended functions: egen
8.4 Recoding variables
8.5 Checking correctness of calculations
8.6 Numbering observations
9 Commands affecting data structure
9.1 Safeguarding your data
9.2 Selecting observations and variables
9.3 Renaming and reordering variables
9.4 Sorting data
9.5 Combining files
9.6 Reshaping data
10 Description and simple analysis
10.1 Overview of a dataset
10.2 Listing observations
10.3 Simple tables for categorical variables
10.4 Analyzing continuous variables
10.5 Estimating confidence intervals
10.6 Immediate commands
11 Graphs
11.1 Anatomy of a graph
11.2 Anatomy of graph commands
11.3 Graph size
11.4 Schemes
11.5 Graph options: Axes
11.6 Graph options: Text elements
11.7 Plot options: Markers, lines, etc.
11.8 Graph examples
11.9 By-graphs and combined graphs
11.10 Using dialogs to generate commands
11.11 The Graph Editor
11.12 Saving, displaying, and printing graphs
12 Stratified analysis
12.1 Cohort data without censorings
12.2 Case–control data
13 Regression analysis
13.1 Linear regression
13.2 Logistic regression
13.3 Other regression models
13.4 Analyzing complex design data
14 Incidence, mortality, and survival
14.1 Incidence and mortality
14.2 Survival analysis
14.3 Cox regression
14.4 Reorganizing st data
14.5 Poisson regression
14.6 Standardization
14.7 Some advanced issues
15 Measurement and diagnosis
15.1 Reproducibility of measurements
15.2 Comparing methods of measurement
15.3 Using tests for diagnosis
15.4 Combining test results
16 Miscellaneous
16.1 Random samples, simulations
16.2 Sample size and study power
16.3 Other analyses
17 Advanced topics
17.1 Using saved results
17.2 Macros and scalars
17.3 Programs
17.4 Useful programming commands
17.5 Do-files and ado-files useful for handling output
18 Taking good care of your data
18.1 The audit trail
18.2 Data collection
18.3 The codebook
18.4 Folders and filenames: The log book
18.5 Entering data
18.6 Inspecting and correcting your data
18.7 Modifying data
18.8 Analysis
18.9 Backing up and archiving
18.10 Protecting against abuse
19 Appendix: Manuals and other good books
19.1 Stata manuals
19.2 Other books on Stata
19.3 Books using Stata
20 Appendix: Exercises
20.1 The user interface
20.2 Managing output
20.3 Calculations
20.4 Working with missing values
20.5 Working with date variables
20.6 Description and simple analysis
20.7 Taking good care of your data
21 Appendix: Advice on working with Windows
References
Author index (PDF)
Subject index (PDF)