Used as a subroutine in InvariantResidualDistributionTest
to test whether residual distribution remains invariant across different levels
of E.
ksResidualDistributions(Y, predicted, E, verbose)An n-dimensional vector.
An n-dimensional vector of predictions for Y.
An n-dimensional vector. E needs to be a factor.
Set to TRUE if output should be printed.
A list with the p-value for the test.