One thing that I cannot find very clear, perhaps because I am still new in using R, is the derivation of the standard errors in instrumental variable packages using R (e.g., ivreg, sem, plm). I am trying to verify that the standard errors do indeed meet the following requirement found in (Wooldridge, 2009, 511):
$$ SE_{IV} = \sqrt{\frac{RSS}{n-K}/\sqrt{TSS_X \times R^2_{X,Z}}} $$
where $X$ is an endogenous regressor and $Z$ an instrumental variable for $X$. The derivation of standard errors for OLS are provided as a convenience below:
$$ SE_{OLS} = \sqrt{\frac{RSS}{n-K}/\sqrt{TSS_X}} $$
I've looked at the r code and due to my inability I have not been able to verify standard errors are calculated this way. I've looked at other posts in cross validated and it is not clear from these discussions either. If anyone has some understanding in this area I would be grateful for your input.