Omitted Variable Bias

TheoryGuru applications

Load Economicreasoning package only if it is not already loaded

If[Length@Names["PLTools`*"]<10,
Get["http://economicreasoning.com"]]

Load other tools by clicking on extras and/or evaluating below

If[Not@MemberQ[$ContextPath,"OtherTools`"],
Get["http://othertools.economicreasoning.com"]]

Notes

Interpret all data variables (x, x1, x2, x3, y) as demeaned.

In the Wolfram Language, x.y refers to the tensor DOT PRODUCT, NOT scalar multiplication.  For TheoryGuru purposes, tensor means vector, so that the result of x.y is a scalar.

?SymbolicRegression

One Regressor

Setup

olsslope=First@SymbolicRegression[y,x]

tslsslope=First@SymbolicRegression[(* second stage *)y,
z First@SymbolicRegression[(* first stage *)x,z]];

y=x β+ϵ;

Result 1: OLS may be biased, unless x.ϵ == 0

TheoryGuru[x.x>0,olsslope==β]

TheoryExtra[]//OtherTools`TFPrintL;

Result 2: bias is in the same direction as x.ϵ

TheoryGuru[x.x>0,
SameSign[olsslope-β,x.ϵ]]

Result 3: TSLS is unbiased if and only if z.ϵ == 0

TheoryOverlap[x.z>0,
tslsslope==β,
z.ϵ==0]

Variable interpretations

Three Regressors

y=x1 β1+x2 β2+x3 β3+ϵ;

resid2=x2-SymbolicRegression[x2,x1,x3].{x1,x3}; (* resid from regression of x2 on the other independent variables *)

olsslope2=SymbolicRegression[y,x1,x2,x3][[2]];
(* [[2]] means take the coefficient corresponding to the 2nd regressor (x2) *)

Result: coefficient 2’s bias is in the same direction as resid2.ϵ

TheoryGuru[{resid2.resid2>0},
SameSign[olsslope2-β2,resid2.ϵ]]

Variable interpretations