# Statistics with STATA: Version 12 – by Hamilton Lawrence C. (2012)

Statistics with Stata: Version 12 is the edition in Professor Lawrence C. Hamilton’s popular Statistics with Stata series. Intended to bridge the gap between statistical texts and Stata’s own documentation, Statistics with Stata demonstrates how to use Stata to perform a variety of tasks.

The first three chapters cover getting started in Stata, data manipulation, and graphics. Hamilton then introduces many statistical procedures available within Stata. These include summary statistics and tables, ANOVA, linear regression (and diagnostics), robust methods, nonlinear regression, regression models for limited dependent variables, complex survey data, survival analysis, factor analysis, cluster analysis, structural equation modeling, multiple imputation, time series, and multilevel mixed-effects models. The final chapter provides an introduction to programming.

The organization of this book makes it ideal for those who are new to statistics, experienced statisticians who are new to Stata, and Stata users wishing to explore Stata’s capabilities in a new field. A series of example commands with brief descriptions at the beginning of each chapter demonstrates the Stata syntax for topics discussed in the chapter. For those already familiar with the statistical technique but not with the corresponding Stata commands, this example section may be all that is needed to begin an analysis using Stata. Following the example sections, Hamilton addresses each topic in more detail with descriptions of statistical procedures, examples using real data, and interpretation of the Stata output.

Provided here are the datasets and other supplemental materials that were used to produce the output in the book Statistics with Stata: Version 12. There are 48 .dta files. You may download them in either of two formats: sws12.zip & sws12.tar.Z.

Preface
Notes on the Eighth Edition
Acknowledgments

1 Stata and Stata Resources
A Typographical Note
An Example Stata Session
Stata’s Documentation and Help Files
Searching for Information
StataCorp
The Stata Journal
Books Using Stata

2 Data Management
Example Commands
Creating a New Dataset by Typing in Data
Creating a New Dataset by Copy and Paste
Specifying Subsets of the Data: in and if Qualifiers
Generating and Replacing Variables
Missing Value Codes
Using Functions
Converting Between Numeric and String Formats
Creating New Categorical and Ordinal Variables
Using Explicit Subscripts with Variables
Importing Data from Other Programs
Combining Two or More Stata Files
Collapsing Data
Reshaping Data
Using Weights
Creating Random Data and Random Samples
Writing Programs for Data Management

3 Graphs
Example Commands
Histograms
Box Plots
Scatterplots and Overlays
Line Plots and Connected-Line Plots
Other Twoway Plot Types
Bar Charts and Pie Charts
Symmetry and Quantile Plots
Graphing with Do-Files
Retrieving and Combining Graphs
Graph Editor
Creative Graphing

4 Survey Data
Example Commands
Declare Survey Data
Design Weights
Poststratification Weights
Survey-Weighted Tables and Graphs
Bar Charts for Multiple Comparisons

5 Summary Statistics and Tables
Example Commands
Summary Statistics for Measurement Variables
Exploratory Data Analysis
Normality Tests and Transformations
Frequency Tables and Two-Way Cross-Tabulations
Multiple Tables and Multi-Way Cross-Tabulations
Tables of Means, Medians and Other Summary Statistics
Using Frequency Weights

6 ANOVA and Other Comparison Methods
Example Commands
One-Sample Tests
Two-Sample Tests
One-Way Analysis of Variance (ANOVA)
Two- and N-Way Analysis of Variance
Factor Variables and Analysis of Covariance (ANCOVA)
Predicted Values and Error-Bar Charts

7 Linear Regression Analysis
Example Commands
Simple Regression
Correlation
Multiple Regression
Hypothesis Tests
Dummy Variables
Interaction Effects
Robust Estimates of Variance
Predicted Values and Residuals
Other Case Statistics
Diagnosing Multicollinearity and Heteroskedasticity
Confidence Bands in Simple Regression
Diagnostic Graphs

Example Commands
Lowess Smoothing
Robust Regression
Further rreg and qreg Applications
Nonlinear Regression — 1
Nonlinear Regression — 2
Box–Cox Regression
Multiple Imputation of Missing Values
Structural Equation Modeling

9 Logistic Regression
Example Commands
Space Shuttle Data
Using Logistic Regression
Marginal or Conditional Effects Plots
Diagnostic Statistics and Plots
Logistic Regression with Ordered-Category y
Multinomial Logistic Regression
Multiple Imputation of Missing Values — Logit Regression Example

10 Survival and Event-Count Models
Example Commands
Survival-Time Data
Count-Time Data
Kaplan–Meier Survivor Functions
Cox Proportional Hazard Models
Exponential and Weibull Regression
Poisson Regression
Generalized Linear Models

11 Principal Component, Factor and Cluster Analysis
Example Commands
Principal Component Analysis and Principal Component Factoring
Rotation
Factor Scores
Principal Factoring
Maximum-Likelihood Factoring
Cluster Analysis — 1
Cluster Analysis — 2
Using Factor Scores in Regression
Measurement and Structural Equation Models

12 Time Series Analysis
Example Commands
Smoothing
Further Time Plot Examples
Recent Climate Change
Correlograms
ARIMA Models
ARMAX Models

13 Multilevel and Mixed-Effects Modeling
Example Commands
Regression with Random Intercepts
Random Intercepts and Slopes
Multiple Random Slopes
Nested Levels
Repeated Measurements
Cross-Sectional Time Series
Mixed-Effects Logit Regression

14 Introduction to Programming
Basic Concepts and Tools
Example Program: multicat (Plot Many Categorical Variables)
Using multicat
Help File
Monte Carlo Simulation
Matrix Programming with Mata

Dataset Sources
References
Index

## Product details

• Publisher : Cengage Learning; 8th edition (April 15, 2012)
• Language : English
• Paperback : 496 pages
• ISBN-10 : 0840064632
• ISBN-13 : 978-0840064639
• Item Weight : 1.55 pounds
• Dimensions : 8 x 0.9 x 9 inches