The dmexog routine, which calculates a test for exogeneity after an
instrumental variables regression, has been improved, an obscure bug
(involving pweights) removed, and proper credit given to the inventors of
this test. The help file has been rewritten (thanks to Mark Schaffer), with
better references to the literature underlying this methodology.
The revised routine is available from SSC via ssc install dmexog.