  We show by simulation that the test for an unknown threshold in models with
endogenous regressors - proposed in Caner and Hansen (2004) - can exhibit
severe size distortions both in small and in moderately large samples,
pertinent to empirical applications. We propose three new tests that rectify
these size distortions. The first test is based on GMM estimators. The other
two are based on unconventional 2SLS estimators, that use additional
information about the linearity (or lack of linearity) of the first stage. Just
like the test in Caner and Hansen (2004), our tests are non-pivotal, and we
prove their bootstrap validity. The empirical application revisits the question
in Ramey and Zubairy (2018) whether government spending multipliers are larger
in recessions, but using tests for an unknown threshold. Consistent with Ramey
and Zubairy (2018), we do not find strong evidence that these multipliers are
larger in recessions.
