  This paper provides a specification test for semiparametric models with
nonparametrically generated regressors. Such variables are not observed by the
researcher but are nonparametrically identified and estimable. Applications of
the test include models with endogenous regressors identified by control
functions, semiparametric sample selection models, or binary games with
incomplete information. The statistic is built from the residuals of the
semiparametric model. A novel wild bootstrap procedure is shown to provide
valid critical values. We consider nonparametric estimators with an automatic
bias correction that makes the test implementable without undersmoothing. In
simulations the test exhibits good small sample performances, and an
application to women's labor force participation decisions shows its
implementation in a real data context.
