Testing for homogeneity of variances is a critical step in combined analysis of variance. In this post you will learn how to perform these tests accurately and interpret the results.
Contents
Introduction
Most of the agricultural research programs are conducted essentially due to two main purposes.
- Explain the way plants and animals respond to changing conditions (basic research)
- Obtain information to solve probelms or to make recommendations (applied research)
Basic research involves a series of single experiments which are carried out in sequence. Such series of experiments are analyzed when completed and due to its sequential nature combined analysis of the experimental data is seldom required.
Assumptions for combined
Combined estimates will be valid only if the sites on which experiments are conducted are random sample of all possible sites in the area. Furthermore, the selection of these sites must be made in a manner that avoids any bias or preference towards a particular location or type of site. It is essential that the sites are chosen in a way that represents the entire area being studied, and that they are distributed in a manner that ensures a fair and unbiased representation of the population. In addition, the sites must be selected based on a clear and well-defined set of criteria, which takes into account factors such as soil type, topography, vegetation, and other relevant environmental variables. The combined estimate will be unbiased if every possible site has an equal chance of being included.
Several experiments may be repeated over an extended period of time, spanning across multiple years, locations, seasons, and harvests. This allows for a comprehensive analysis of the data collected, ensuring that the results are accurate and reliable.
Preliminary analysis
Before proceeding for combined analysis of variance, it is important to perform a preliminary analysis to ensure that the data meets certain assumptions and to identify any potential issues that may affect the analysis. Here are some common steps for conducting a preliminary analysis of repeated experiments:
- Calculate experimental error for repeating variable (each site or year or season): You need to complete the analysis of variance for each year or site or season to get the experimental error for the repeating factor.
- Check homogeneity of variances: Another assumption of many statistical tests is that the variances of the data are equal across different groups. Therefore, it is important to check for homogeneity of variances for each treatment and year combination. This can be done with tests such as Levene’s test, Bartlett’s test or Hartley’s test.
- Estimate of the interaction of treatment with the repeating factor: You need to design or build analysis of variance model that will estimate the effect of treatments with the repeating factor (i.e. year in this example).
From the output of the above steps the combined analysis of variance may be undertaken. The second step of testing the heterogeneity of variances is the main topic of discussion here. To test whether the variances are heterogeneous or not, an excel tool has been developed to facilitate this preliminary analysis before proceeding for combined analysis of variance.
Tests for homogeneity of variances
There are several methods which are used to test the homogeneity of variances for series of experiments. The most popular methods include:
- Hartley’s test (F-ratio test): This test is based on the F-distribution, and involves calculating the ratio of the largest variance to the smallest variance. The test statistic, known as the Hartley’s F-value, is calculated as the square of this ratio.
- Levene’s test: This test compares the variances of the groups being compared and checks if they are significantly different. It is a widely used test for homogeneity of variances.
- Bartlett’s test: Similar to Levene’s test, Bartlett’s test checks if the variances of the groups are equal or not. However, it assumes that the data is normally distributed.
- Brown-Forsythe test: This test is a modified version of Levene’s test and is more robust to violations of normality. It works by using medians instead of means to estimate the variance.
- Fligner-Killeen Test: This test is a non-parametric alternative to Levene’s and Bartlett’s tests. It does not assume normality of data and is suitable for small to moderate sample sizes.
In the excel tool, one can perform Hartley’s test and Bartlett’s test for testing the homogeneity of variances.
Description of excel tool
The first sheet labeled as homogeneity tests
you can choose either F-test (Hartley’s test) or Bartlett’s test.
Hartley’s test
The Hartley’s test is a quick test of homogeneity of variance which is provided by the ratio of largest to the smallest variance (\(\sigma^2\)) in the set.
$$
F\ test=\frac{\sigma^2(max.)}{\sigma^2(min.)}
$$
Hartley’s test becomes more useful and simple when error mean squares are arising out of experiments having equal number of replications.
In the main page when you will select the F test
another sheet will open where you can enter maximum and minimum variances and error degree of freedom values in Enter Data Here section as shown in figure below.
The second section of this sheet is F-ratio test which will show the output indicating whether the variances are homogeneous or not. Follow the instructions in conclusion section.
As a rule of thumb, if the above ratio be less than 3, then the variances are generally taken as homogeneous otherwise not.
Bartlett’s test
Another procedure which is more sensitive than the F test is the Bartlett’s test of homogeneity of variance. This test is based on the natural logarithm of the sample variances as describes by Snedecor and Cochran (1980). The calculation for this test is carried out through following formula.
$$
M = \gamma\:[\:a(\:ln \:\bar{s}^{2}) \:-\:\sum\limits_{i}\: ln \: s_{i}^{2}\:]
$$
and
$$
C = 1 \:+\:\frac{a + 1}{3a\gamma}
$$
Where;
\(\bar{s}^{2} = \frac{\sum_i \: s_{i}^2}{a}\)
\(\gamma =\) error degree of freedom for the individual trials
\(s_i^2 =\) error mean square at location i
\(a =\) number of locations
Then
$$
\chi^2 = \frac{M}{C}
$$
Bartlett’s test for homogeneity of variance can be performed even when error mean squares are arising out of experiments having different replications.
Conclusion of the test
Based on the probability value in excel tool following conclusions can be drawn.
p-value ≤ 0.05
: the variances are heterogenous (see failure of homogeneity assumption).p-value > 0.05
: the variances are homogenous and data can be pooled to carry out the combined analysis of variance.
Failure of homogeneity assumption
If the homogeneity test indicates that the variances are heterogeneous then go through the following steps.
- Data transformation \(\rightarrow\) \(MSE_{weighted}=\frac{1}{\sqrt{MSE}}\)
- Define new variable \(\rightarrow\) \(Old\:variable\:\times\:MSE_{weighted}\)
- Run a combined analysis of variance by using the new variable
How to download this excel tool
To download this excel tool please follow the instructions as given below:
- Click on the download link given below
- A new window will appear, go to
File
and selectSave As
- Click on
Download a Copy
The excel tool will download in a very short time.
Please comment below if you have any questions
Download this excel tool — Click here