Introduction to Stata
17.871
Spring 2012
1
The role of statistical packages in
research
Obvious answer
Manage data
Carry out appropriate statistical tests
Assist in displaying data
Less obvious answer
Channel the type of research you are likely to d
Bivariate
Relationships
17.871
2012
1
Testing associations (not causation!)
ti
Continuous data
Scatter plot (always use first!)
(Pearson) correlation coefficient (rare, should be rarer!)
correlation coefficient (rare should be rarer!)
(Spearman) rank-o
Introduction to
ti
Descriptive
Descriptive
Statistics
17.871
Spring 2012
1
Key measures
Key measures
Describing data
Moment
Center
Spread
Spread
Skew
Peaked
Non-mean based
measure
Mean
Mode, median
Variance
Range,
(standard deviation) Interquartile range
Addressing Alternative
Explanations:
Explanations:
Multiple Regression
17.871
Spring 2012
1
Did Cli
Did Clinton hurt Gore example
Did Clinton hurt Gore in the 2000 election?
Treatment
is not liking Bill Clinton
is not liking Bill Clinton
2
Bivariate regr
Sampling and Inference
Sampling and Inference
The Quality of Data and Measures
2012
1
Why do we sample?
Cost/
benefit
Benefit
(precision)
Cost
(hassle factor)
N
2
Effects of samples
Obvious: influences marginals
Less obvious
Less obvious
Allows effecti
Final Project Assignment
17.871
Spring 2012
Assignment summary
You will make two oral presentations, of 15 minutes in length, and turn in a final research paper,
1520 pages long.
Presentations
General considerations. Both presentations will be limited to
17.871
Spring 2012
Group Projects
Assignment summary
Working with your assigned group, answer the question posed to you. You will give a 20minute presentation (with 5 minutes available for questions) on your work on March 12. Your
group will also turn in
17.871
Spring 2012
Group Projects: Further Guidance
Assignment summary
Working with your assigned group, answer the question posed to you. Each of the questions can be
answered with regression analysis, and I would prefer to see at least one regression re
17.871
Spring 2012
Hard-Nosed Empiricist Assignment
Assignment
Write a paragraph or two about a causal claim that you believe (or someone you know believes),
but for which you are unaware of any scientific evidence. Briefly, look up and describe one or
tw
17.871
Spring 2012
First assignment: introductions
For the next class meeting, come to class prepared to suggest a final project you are likely to be
interested in pursuing. You should say something about the following:
1. What is the question you would l
Problem Set 1 Solutions
Note: Text that is preceded by a . is the Stata code used in the analysis. Text enclosed in *s
explains what each piece of code is doing. Where relevant, I have pasted the actual Stata output.
Part I
*Using semicolon as delimiter*
Problem Set 2 Solutions
Note: Text that is preceded by a . is the Stata code used in the analysis. Text enclosed in *s
explains what each piece of code is doing. Where relevant, I have pasted the actual Stata output.
Part I
Romney votes by Texas County
Problem Set 4 Solutions
Note: Text that is preceded by a . is the Stata code used in the analysis. Text enclosed
in *s explains what each piece of code is doing. Where relevant, I have pasted the
actual Stata output.
Part I
. clear
. delimit;
. set more o
Problem Set 5 Solutions
Part 1A
A one unit increase in the importance of religion is ones life is associated with a 16.7
percentage point decrease in the probability of supporting gay marriage. Equivalently, as
religion moves from not at all important to