Levene and wilcoxon test to compare first and second moments of residual distributions
Used as a subroutine in InvariantResidualDistributionTest
to test whether residual distribution remains invariant across different levels of E.
leveneAndWilcoxResidualDistributions(Y, predicted, E, verbose)
Y
: An n-dimensional vector.predicted
: An n-dimensional vector of predictions for Y.E
: An n-dimensional vector. E
needs to be a factor.verbose
: Set to TRUE
if output should be printed.A list with the p-value for the test.
Useful links