Durbin’s test of exogeneity

variables{str, list[str]}

List of variables to test for exogeneity. If None, all variables are jointly tested.


Object containing test statistic, p-value, distribution and null


Test statistic is difference between sum of squared OLS and sum of squared IV residuals where each set of residuals has been projected onto the set of instruments in the IV model.

Start by defining

\[\delta & = \hat{\epsilon}'_e P_{[z,w]} \hat{\epsilon}_e - \hat{\epsilon}'_c P_{z} \hat{\epsilon}_c\]

where \(\hat{\epsilon}_e\) are the regression residuals from a model where vars are treated as exogenous, \(\hat{\epsilon}_c\) are the regression residuals from the model leaving vars as endogenous, \(P_{[z,w]}\) is a projection matrix onto the exogenous variables and instruments (z) as well as vars, and \(P_{z}\) is a projection matrix only onto z.

The test statistic is then

\[\delta / (\hat{\epsilon}'_e\hat{\epsilon}_e) / n \sim \chi^2_{q}\]

where \(q\) is the number of variables tested.