Interesting point. I think it might be a function of the dropped observations due to logging negative values of x – when I make the following modification to the code, controlling for codetermined_outcome no longer fixes the bias in the coefficient on x:

replace x = 2*runiform() + e // x endogenous

replace y = x + e

replace codetermined_outcome = x^2 + e + u

reg y x

reg y x codetermined_outcome

Can you get this to work without the missing-values issue? In retrospect I should never have arbitrarily chosen to include a log in my arbitrary functional form.

]]>The motivation was about a case where x is endogenous (like reg wage education), but x is random in your example. If x is endogenous, I think you may sometimes consider controlling for other outcomes. Try:

replace x = 2*runiform() + e // x endogenous

replace y = x + e

replace codetermined_outcome = x^2 + ln(x) + e + u

reg y x

reg y x codetermined_outcome

Thanks for letting me know! I took it as an amusing way of revealing the company’s true feelings (and your current comment still doesn’t rule that interpretation out…). I’ve updated the post in case people don’t see your comment.

]]>Cape Verde is an island off the coast of West Africa. Boston has a large Cape Verdean community concentrated in a couple of neighborhoods, that have a pretty bad crime problem as I understand it.

]]>