NonlinearityTests function

Nonlinearity tests