#Packages list
library(stargazer)
library(corrplot)Discussion_4
I. Bias of an estimator
Simply stated, bias of an estimator is the difference between. Omitted variable bias occurs when an important variable that has both effects on the independent and dependent variables is left out of the study.
II. Reducing Bias
The bias goes away if you add more variables to the model only if that excluded variable has an effect on both the dependent and independent variables, meaning that the correlation between omitted variable and independent or dependent variables cannot be 0.
The bias does not go away if we increase the sample size
III. OVB Examples
1.
dt <- data.frame(state.x77) This data set is a cross-sectional data that contains some demographics and other social characteristics of the 50 US states for the year 1977.
Variables:
population: estimate of total population (in thousands)
Income: per capita income
illiteracy: illiteracy as a percent of the population
life expentancy: life expentancy in years
murder: murder and non-negligent manslaughter rate per 100,000 people.
HS grad: percentage of high-school graduates
forst: mean of days with minimum temperature below freezing in capital or large city
area: land area in square miles
cor1 <- cor(dt)
corrplot(cor1, type = "upper", order = "original", tl.col = "black" ,
tl.srt = 90, tl.cex = .8)\[ Income_i = \beta_0 + \beta_1HS.Grad + \beta_2Population_i + \epsilon_i \]
reg1 <- lm(data = dt,
formula = Income ~ HS.Grad + Population)
stargazer(reg1,
type = "text")
===============================================
Dependent variable:
---------------------------
Income
-----------------------------------------------
HS.Grad 49.200***
(8.213)
Population 0.037**
(0.015)
Constant 1,663.973***
(451.578)
-----------------------------------------------
Observations 50
R2 0.458
Adjusted R2 0.434
Residual Std. Error 462.097 (df = 47)
F Statistic 19.821*** (df = 2; 47)
===============================================
Note: *p<0.1; **p<0.05; ***p<0.01
2.
\[ Income_i = \beta_0 + \beta_1HS.Grad + \epsilon_i \]
reg2 <- lm(data = dt,
formula = Income ~ HS.Grad)
stargazer(reg2,
type = "text")
===============================================
Dependent variable:
---------------------------
Income
-----------------------------------------------
HS.Grad 47.162***
(8.616)
Constant 1,931.105***
(462.739)
-----------------------------------------------
Observations 50
R2 0.384
Adjusted R2 0.371
Residual Std. Error 487.144 (df = 48)
F Statistic 29.962*** (df = 1; 48)
===============================================
Note: *p<0.1; **p<0.05; ***p<0.01
3.
cor(dt[,c(2,6,1)]) Income HS.Grad Population
Income 1.0000000 0.61993232 0.20822756
HS.Grad 0.6199323 1.00000000 -0.09848975
Population 0.2082276 -0.09848975 1.00000000
correlation between omitted variable and y is statistically significant (0.208)
correlation between omitted variable and key x is statistically significant (-0.098)
4.
OVB will be negative because the correlation of \(population\) and \(HS.Grad\) is negative (-0.098), and the effect of \(population\) in \(income\) is positive (0.208). It would be the top right corner in the 2x2 matrix.
5.
stargazer(reg1, reg2,
type = "text")
=================================================================
Dependent variable:
---------------------------------------------
Income
(1) (2)
-----------------------------------------------------------------
HS.Grad 49.200*** 47.162***
(8.213) (8.616)
Population 0.037**
(0.015)
Constant 1,663.973*** 1,931.105***
(451.578) (462.739)
-----------------------------------------------------------------
Observations 50 50
R2 0.458 0.384
Adjusted R2 0.434 0.371
Residual Std. Error 462.097 (df = 47) 487.144 (df = 48)
F Statistic 19.821*** (df = 2; 47) 29.962*** (df = 1; 48)
=================================================================
Note: *p<0.1; **p<0.05; ***p<0.01
Since the bias is negative, our short model would have a smaller value than the true model, which is the case here for the variable \(HS.Grad\)
6.
I can see why in this example, the OVB works and why it is of a negative direction. \(HS.Grad\) and \(Population\) are negatively correlated because the variable is a percentage of the total population, if the population where to increase but keeping high school graduates constant, the percentage will decrease. \(Income\) and \(population\) are positively correlated because the more people there are, the higher the per capita income.