/* Misspecification Example: Ommited Variables Sales of a product depends on its own price and the competitor's price. It has negative relationship with its own price and positive relationship with competitor's price. This is a simulation data using specific coefficients to generate the data. The true model includes price (x1) and compprice(x2) and True Model: Price = 10 + -0.5 Price + 0.7 Compprice + ei */ clear all set obs 1000 set seed 1234 gen ei = rnormal(0,1) gen price = rnormal(10,2) sum gen r1 = rnormal(10,2) gen compprice = 0.5*price + 0.5*r1 * Here are the true model for sale gen sale = 10 - 0.5*price + 0.7*compprice + ei corr sale price compprice * Here is the regression model reg sale price reg sale price compprice