Usage Note 22526: Is there a way to test for unequal variances (heteroscedasticity)?
You can compare the variances of two populations using PROC TTEST. A folded F statistic testing the equality of the two variances is provided by default in the "Equality of Variances" table in the PROC TTEST results. The test assumes the response is normally distributed. For an example, see "Comparing Group Means" in the Getting Started section of the PROC TTEST documentation.
The HOVTEST= option in the MEANS statement of the ANOVA and GLM procedures enables you to test the equality (homogeneity) of variances for one-way ANOVA models. The Bartlett, Brown-Forsythe, Levene (the default), and O'Brien variance tests are provided. You can also use the WELCH option in the MEANS statement in PROC GLM to perform Welch's ANOVA when the group variances are not assumed to be equal. Welch's ANOVA is robust to the assumption of equal variances for one-way models. For example, the following statements request the Levene's test for homogeneity of variances and the Welch's ANOVA model:
proc glm;
class trt;
model y = trt;
means trt / hovtest=levene welch;
run;
For an example, see "Testing for Equal Group Variances" in the Examples section of the PROC GLM documentation.
It is also possible to model the variance at the same time that you model the mean response by using the HETERO statement in PROC QLIM (SAS/ETS software) or by using the VARMOD macro.
Operating System and Release Information
| SAS System | SAS/STAT | All | n/a | |
| SAS System | SAS/ETS | z/OS | 8.1 TS1M0 | |
| OpenVMS VAX | 8.1 TS1M0 | |
| OS/2 | 8.1 TS1M0 | |
| Microsoft Windows 95/98 | 8.1 TS1M0 | |
| Microsoft Windows 2000 Advanced Server | 8.1 TS1M0 | |
| Microsoft Windows 2000 Datacenter Server | 8.1 TS1M0 | |
| Microsoft Windows 2000 Server | 8.1 TS1M0 | |
| Microsoft Windows 2000 Professional | 8.1 TS1M0 | |
| Microsoft Windows NT Workstation | 8.1 TS1M0 | |
| Microsoft Windows XP Professional | 8.1 TS1M0 | |
| Windows Millennium Edition (Me) | 8.1 TS1M0 | |
| ABI+ for Intel Architecture | 8.1 TS1M0 | |
| AIX | 8.1 TS1M0 | |
| HP-UX | 8.1 TS1M0 | |
| IRIX | 8.1 TS1M0 | |
| OpenVMS Alpha | 8.1 TS1M0 | |
| Solaris | 8.1 TS1M0 | |
| Tru64 UNIX | 8.1 TS1M0 | |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
| Type: | Usage Note |
| Priority: | low |
| Topic: | SAS Reference ==> Procedures ==> GLM SAS Reference ==> Procedures ==> ANOVA Analytics ==> Analysis of Variance SAS Reference ==> Procedures ==> QLIM
|
| Date Modified: | 2005-10-10 11:16:00 |
| Date Created: | 2002-12-16 10:56:39 |