  A Bayes factor is proposed for testing whether the effect of a key predictor
variable on the dependent variable is linear or nonlinear, possibly while
controlling for certain covariates. The test can be used (i) when one is
interested in quantifying the relative evidence in the data of a linear versus
a nonlinear relationship and (ii) to quantify the evidence in the data in favor
of a linear relationship (useful when building linear models based on
transformed variables). Under the nonlinear model, a Gaussian process prior is
employed using a parameterization similar to Zellner's $g$ prior resulting in a
scale-invariant test. Moreover a Bayes factor is proposed for one-sided testing
of whether the nonlinear effect is consistently positive, consistently
negative, or neither. Applications are provides from various fields including
social network research and education.
