Using Stata for Quantitative Analysis
Реклама. ООО «ЛитРес», ИНН: 7719571260.
Оглавление
Kyle C. Longest. Using Stata for Quantitative Analysis
Using Stata® for Quantitative Analysis
Using Stata® for Quantitative Analysis
BRIEF CONTENTS
DETAILED CONTENTS
LIST OF A CLOSER LOOK BOXES
Preface. Motivation and Purpose
About the National Study of Youth and Religion
A Note on Versions
A Note on Notation
References
Acknowledgments
About the Author
Part I Foundations for Working With Stata
1 Getting to Know Stata 15
What You See2
Getting Started With Data Files
Opening and Saving Stata Data Files
Data Browser and Editor
A CLOSER LOOK: STATA DATA FILES ACROSS VERSIONS
A CLOSER LOOK: YOUR FIRST COMMAND
Entering Your Own Data
Using Different Types of Data Files in Stata
A CLOSER LOOK: COMBINING DATA
Appending Data
Merging Data
Types of Variables in Data Files
A CLOSER LOOK: VARIABLE TYPES
Exercises
2 The Essentials
Intuition and Stata Commands
A CLOSER LOOK: COMMANDS VERSUS POINT-AND-CLICK
The Structure of Stata Commands
Command
Variables
if Statements
Options
Executing a Command Using the Command Window
The 5 Essential Commands
tabulate
A CLOSER LOOK: COMMAND SHORTCUTS
summary
generate
replace (if)
A CLOSER LOOK: MATHEMATICAL OPERATORS AND THEIR SYMBOLS
A CLOSER LOOK: THE “DREADED” ERROR MESSAGE
A CLOSER LOOK: LOGICAL OPERATORS AND THEIR SYMBOLS
recode
A CLOSER LOOK: MULTIPLE COMMANDS TO THE SAME ENDS
Nonessential, Everyday Commands
rename
drop/keep (if)
describe
display
set more off
Summary of Commands Used in This Chapter
Exercises
3 Do Files and Data Management
What Is a Do File?
Opening and Saving Do Files
Translation From the Command Window
Getting the Most Out of Do Files
Data Management
Working With Labels
Missing Data
A CLOSER LOOK: WHEN A MISSING CASE MAY NOT BE MISSING
Using String Variables
Saving Results
Summary of Commands Used in This Chapter
Exercises
Part II Quantitative Analysis With Stata
4 Descriptive Statistics
Frequency Distributions
Histograms and Bar Graphs
A CLOSER LOOK: USING COMMANDS TO CREATE GRAPHS
Measures of Central Tendency and Variability
A CLOSER LOOK: STATISTICS AND THEIR CODES FOR USE WITH TABSTAT, STAT (STATNAME)
Box Plots
A CLOSER LOOK: USING HISTOGRAMS TO EXAMINE CENTRAL TENDENCY AND VARIABILITY
Summary of Commands Used in This Chapter
Exercises
5 Relationships Between Nominal and Ordinal Variables
Cross-Tabulations
A CLOSER LOOK: RECODING FOR DIRECTION
A CLOSER LOOK: RECODING AND VALUE LABELS—A SHORTCUT
Chi-Square Test
Measures of Association
Elaboration
A CLOSER LOOK: USING –BYSORT– AS A UNIVERSAL TOOL
Multivariate Bar Graphs
Summary of Commands Used in This Chapter
Exercises
6 Relationships Between Different Measurement Levels
Testing Means
Confidence Intervals
Testing a Specific Value (One-Sample t Test)
Testing the Mean of Two Groups (Independent-Samples t Test)
Testing Proportions
A CLOSER LOOK: TESTS OF MEANS AND PROPORTIONS WITHOUT DATA
Multivariate Means Graphs
Analysis of Variance (ANOVA)
Summary of Commands Used in This Chapter
Exercises
7 Relationships Between Interval-Ratio Variables
Correlation
Scatterplots
Linear Regression
Multiple Linear Regression
A CLOSER LOOK: PREDICTIONS AFTER REGRESSION ANALYSES
Dichotomous (Dummy) Variables and Linear Regression
Beyond Linear Regression
Summary of Commands Used in This Chapter
Exercises
8 Enhancing Your Command Repertoire
Stata Help Files
Ways to Search and Access
Structure and Language
A CLOSER LOOK: HELP FILE CODE WORDS
Advanced Convenience Commands
tab, gen(newvar)
A CLOSER LOOK: USING WILDCARDS
egen
mark and markout
alpha, gen(newvar)
Expanding Stata’s Capabilities
Summary of Commands Used in This Chapter
Exercises
Chapter Exercise Solutions1
Chapter 1
Chapter 2
Chapter 3
Chapter 4
Chapter 5
Chapter 6
Chapter 7
Chapter 8
Alphabetical Command Index and Glossary
Отрывок из книги
Third Edition
1 Assuredly, there are several very good and effective texts on learning Stata. Virtually all of these, however, are aimed at experienced users or are so detailed and long that they are not helpful for a typical classroom in which teaching Stata is not the primary purpose.
.....
Click on the Browse button to find the Excel data that you would like to turn into a Stata data set. Once you have selected the Excel file, you can pick a particular worksheet from that file or even a particular set of cells by using the corresponding boxes. Once you have selected a file, you need to make one key determination that is based on how the data are entered in the Excel file. Notice the radio box to denote “Import first row as variable names.” Whether you should select this option will depend on whether your Excel file contains variable names in the first row or whether it contains only data. The two formats are shown in Figures 1.5 and 1.6.
FIGURE 1.5 • FIRST ROW AS VARIABLE NAMES
.....