Testing the adequacy of smooth transition autoregressive models