Omitted Variable Bias (OVB) Example

Illustrates why OVB is an issue This issue plagues a lot of the analysis using secondary or observational data Data are already existing We may have unobserved characteristics that were not collected To illustrate how OVB may affect regression results, we examine some simulated data. Create some correlated data library(stargazer) #to create simpler regression output library(gendata) #to simulate data #1 create two correlated variables X1 and X2 (r = .