  We propose and analyze nonparametric tests of the null hypothesis that a
function belongs to a specified parametric family. The tests are based on BIC
approximations, \pi_{BIC}, to the posterior probability of the null model, and
may be carried out in either Bayesian or frequentist fashion. We obtain results
on the asymptotic distribution of \pi_{BIC} under both the null hypothesis and
local alternatives. One version of \pi_{BIC}, call it \pi_{BIC}^*, uses a class
of models that are orthogonal to each other and growing in number without bound
as sample size, n, tends to infinity. We show that \sqrtn(1-\pi_{BIC}^*)
converges in distribution to a stable law under the null hypothesis. We also
show that \pi_{BIC}^* can detect local alternatives converging to the null at
the rate \sqrt\log n/n. A particularly interesting finding is that the power of
the \pi_{BIC}^*-based test is asymptotically equal to that of a test based on
the maximum of alternative log-likelihoods. Simulation results and an example
involving variable star data illustrate desirable features of the proposed
tests.
