Levene's test checks are used to understand homogeneous variances in attributes in relation to the data frame mentioned and the null hypothesis test is used to verify the fact that all variances are equal. A resulting p-value that is calculated as being under 0.05 using this test means that variances are not equal and further parametric analysis tests, such as ANOVA, are not considered appropriate.
This test is usually preferred with normally distributed data, but it can also tolerate a comparatively low deviation from normality.
The corresponding function in R is as follows:
leveneTest(dataset~groups, data=dataframe)
Here, the parameters refer to the following:
- dataset: The vector containing the numerical data
- groups: The vector that contains the names or labels of the groups that need to be compared
data= is followed by the name of the whole data frame...