Expectations, learning gains, and forecast errors: Assessing nonlinearities with a functional coefficient approach