1.1 — Introduction to Econometrics
ECON 480 • Econometrics • Fall 2022
Dr. Ryan Safner
Associate Professor of Economics
safner@hood.edu
ryansafner/metricsF22
metricsF22.classes.ryansafner.com
Ph.D (Economics) — George Mason University, 2015
B.A. (Economics) — University of Connecticut, 2011
7th year teaching at Hood
Specializations:
Research interests
Democrat | Republican |
---|---|
61% | 80% |
Democrat | Republican | |
---|---|---|
North | 94% | 85% |
(145/154) | (138/162) | |
South | 7% | 0% |
(7/94) | (0/10) | |
Overall | 61% | 80% |
(152/248) | (138/172) |
Larger proportion of Democrats \((\frac{94}{248}\), 38%) than Republicans \((\frac{10}{172}\), 6%) were from South
The 7% of southern Democrats voting for the Act dragged down the Democrats’ overall percentage more than the 0% of southern Republicans
Suppose you suffer from kidney stones, your doctor offers you treatment A or treatment B
In clinical trials, Treatment A was effective for a higher percentage of patients with large stones and a higher percentage of patients with small stones
Treatment B was effective for a larger percentage of patients overall than treatment A
Wait, what?
From a real medical study:
Treatment A | Treatment B | |
---|---|---|
Small Stones | 93% | 87% |
(81/87) | (234/270) | |
Large Stones | 73% | 69% |
(192/263) | (55/80) | |
Overall | 78% | 83% |
(273/350) | (289/350) |
C R Charig, D R Webb, S R Payne, and J E Wickham, 1986, “Comparison of treatment of renal calculi by open surgery, percutaneous nephrolithotomy, and extracorporeal shockwave lithotripsy,” Br Med J (Clin Res Ed) 292(6524): 879–882.
From a real medical study:
Treatment A | Treatment B | |
---|---|---|
Small Stones | 93% | 87% |
(81/87) | (234/270) | |
Large Stones | 73% | 69% |
(192/263) | (55/80) | |
Overall | 78% | 83% |
(273/350) | (289/350) |
C R Charig, D R Webb, S R Payne, and J E Wickham, 1986, “Comparison of treatment of renal calculi by open surgery, percutaneous nephrolithotomy, and extracorporeal shockwave lithotripsy,” Br Med J (Clin Res Ed) 292(6524): 879–882.
1964: U.S. Surgeon General issued a report claiming that cigarette smoking causes lung cancer
Evidence based primarily on correlations between cigarette smoking and lung cancer
Ronald A. Fisher
1890—1924
There could be a confounding variable (“smoking gene”) that causes both lung cancer and the urge to smoke
Would imply: decision to smoke or not would have no impact on lung cancer!
Correlation between smoking and cancer is spurious!
It’s always good to be skeptical of causal claims
But this is actually where econometrics shines
Econometrics is the application of statistical tools to quantify economic relationships in the real world
Uses real data to
What sets econometrics apart from mere statistics (or uses of statistics in other disciplines) is its role in causal inference
We can, with proper tools and interprations, make quantitative causal claims
A 50% increase in police presence in a metropolitan area lowers crime rates by 15%, on average^{1}
Being an incumbent in office raises the probability of re-election by 40-45 percentage points^{2}
European cities with at least one printing press in 1500 were at least 29% more likely to become Protestant by 1600^{3}
R
and R Studio
for analyzing and presenting data\(\bar{x} = \frac{1}{n} \displaystyle\sum^n_{i=1} x_i\)
\(\sigma_x = \displaystyle \sqrt{\frac{1}{n} \sum^n_{i=1} (x_i-\bar{x})^2}\)
\(r_{xy}= \displaystyle \frac{\displaystyle\sum^n_{i=1}(x_i-\bar{x})(y_i-\bar{y})}{\sqrt{\displaystyle\sum^n_{i=1}(x_i-\bar{x})^2\sum^n_{i=1}(y_i-\bar{y})^2}}\)
Use pre-cleaned “toy” data, if at all
By the end of this semester, you will:
Data Scientist (n.): Person who is better at statistics than any software engineer and better at software engineering than any statistician.
— Josh Wills (@josh_wills) May 3, 2012
\[\color{orange}{Y}=\color{teal}{f}(\color{purple}{X})\]
“[T]he field of economics has spent decades developing a toolkit aimed at investigating empirical relationships, focusing on techniques to help understand which correlations speak to a causal relationship and which do not. This comes up all the time — does Uber Express Pool grow the full Uber user base, or simply draw in users from other Uber products? Should eBay advertise on Google, or does this simply syphon off people who would have come through organic search anyway? Are African-American Airbnb users rejected on the basis of their race? These are just a few of the countless questions that tech companies are grappling with, investing heavily in understanding the extent of a causal relationship.”
library(gapminder)
library(gganimate)
gapminder %>%
filter(continent != "Oceania") %>%
ggplot(aes(x = gdpPercap,
y = lifeExp,
color = country,
size = pop))+
geom_point(alpha=0.3)+
scale_x_log10(breaks=c(1000,10000, 100000),
label=scales::dollar)+
scale_size(range = c(0.5, 12)) +
scale_color_manual(values = gapminder::country_colors) +
labs(x = "GDP/Capita",
y = "Life Expectancy (Years)",
caption = "Source: Hans Rosling's gapminder.org",
title = "Income & Life Expectancy - {frame_time}")+
facet_wrap(~continent)+
guides(color = F, size = F)+
theme_minimal(base_family = "Fira Sans Condensed")+
transition_time(year)+
ease_aes("linear")
Assignment | Percent | |
---|---|---|
1 | Research Project | 30% |
n | Homeworks (Average) | 25% |
1 | Midterm | 20% |
1 | Final | 25% |
Office hours: MW 1:30-2:30 PM & by appt
Slack channel
See the resources page for tips for success and more helpful resources
Take notes. On paper. Really.
Work together on assignments and study together.
Ask questions, come to office hours. Don’t struggle in silence, you are not alone!
The biggest skill you are developing is learning how to learn^{1}
See the reference page for more
Register for R Studio Cloud
(Optional but highly recommended) Install R and R Studio on your computer