to the projection matrix . This expression collapses to the first when the number of instruments is equal to the number of covariates in the equation of interest. The over-identified IV is therefore a generalization of the just-identified IV. Developing the expression: In the just-identified case, we have as many instruments as covariates, so that the dimension of X is the same as that of Z. Hence, and are all squared matrices of the same dimension. We can expand the inverse, using the fact that, for any invertible n-by-n matrices A and B, (AB)−1 = B−1A−1 (see Invertible matrix#Properties): Reference: see Davidson and Mackinnnon (1993) There is an equivalent under-identified estimator for the case where m < k. Since the parameters are the solutions to a set of linear equations, an under-identified model using the set of equations does not have a unique solution. Interpretation as two-stage least squares One computational method which can be used to calculate IV estimates is two-stage least squares (2SLS or TSLS). In the first stage, each explanatory variable that is an endogenous covariate in the equation of interest is regressed on all of the exogenous variables in the model, including both exogenous covariates in the equation of interest and the excluded instruments. The predicted values from these regressions are obtained: Stage 1: Regress each column of X on Z, (): and save the predicted values: In the second stage, the regression of interest is estimated as usual, except that in this stage each endogenous covariate is replaced with the predicted values from the first stage: Stage 2: Regress Y on the predicted values from the first stage: which gives This method is only valid in linear models. For categorical endogenous covariates, one might be tempted to use a different first stage than ordinary least squares, such as a probit model for the first stage followed by OLS for the second. This is commonly known in the econometric literature as the forbidden regression, because second-stage IV parameter estimates are consistent only in special cases. The usual OLS estimator is: . Replacing and noting that is a symmetric and idempotent matrix, so that The resulting estimator of is numerically identical to the expression displayed above. A small correction must be made to the sum-of-squared residuals in the second-stage fitted model in order that the covariance matrix of is calculated correctly. Non-parametric analysis When the form of