1. Home
  2. VHOMOGENEITY procedure

VHOMOGENEITY procedure

Tests homogeneity of variances and variance-covariance matrices (R.W. Payne).

Options

PRINT = string tokens Controls printed output (test, variances); default test
GROUPS = factors Define the groups whose variances are to be compared; these need be given only if DATA is set

Parameters

DATA = variates or pointers Data variate from which variances are calculated, or pointer to a list of variates from which variance-covariance matrices are calculated
VARIANCES = any numerical structures or pointers Supplies the variances (in any numerical structure) or variance-covariance matrices in a pointer to a list of symmetric matrices if the DATA parameter is not set, or saves variances (in a table) and variance-covariance matrices (in a pointer to a list of symmetric matrices) if they have been calculated from DATA and GROUPS
DF = any numerical structure Supplies the degrees of freedom for variances (in any numerical structure) or for variance-covariance matrices (as a pointer to a list of scalars) if the DATA parameter is not set, or saves the degrees of freedom for variances (in a table) or variance-covariance matrices (as a pointer to a list of scalars) if they have been calculated from DATA and GROUPS
SAVE = pointers Saves the results i.e. type of test, chi-square statistic, degrees of freedom and probability

Description

Equality of variances of residuals is an important requirement for the validity of analysis of variance and regression. VHOMOGENEITY allows the homogeneity of variances in different groups to be assessed using Bartlett’s test. This test is rather sensitive to departures from Normality (another requirement for the validity of these analyses); so it is recommended that the residuals also be examined, for example using procedures RCHECK or APLOT.

To test homogeneity of variances, VHOMOGENEITY can take as input either the original data values together with factors defining the groups, or variances along with degrees of freedom. For the first method the DATA parameter should be set to a variate containing the data values; the factors are specified by the GROUPS option. For the second method the variances are input (in any numerical structure) using the VARIANCES parameter, and the degrees of freedom (in a structure of the same type as for VARIANCES) using the DF parameter.

With multivariate data, the analogous test for variance-covariance matrices is given by Box (1950). Again two methods of input are available. The original data variates can be supplied, in a pointer, using the DATA parameter and the factors can be listed by the GROUPS option (as for a single variate). Alternatively, the VARIANCES parameter can be set to a pointer containing the variance-covariance matrices to be tested, and the DF parameter to a pointer containing the corresponding degrees of freedom.

If the variances and degrees of freedom are to be calculated by the procedure (from DATA and GROUPS), the VARIANCES and DF parameters can be used to save the calculated values. When testing homogeneity of variances, the variances and degrees of freedom are saved in tables, classified by the GROUPS factors; these tables need not be declared in advance. With variance-covariance matrices, VARIANCES is a pointer to the list of symmetric matrices that have been formed, and DF a pointer to a list of scalars.

Printed output is controlled by the PRINT option, with settings variances and test to print the variances and the test statistics respectively. By default, PRINT=test.

You can save the results of the test, in a pointer, using the SAVE parameter. The pointer has the following elements:

'test' type of test (Bartlett or Box),
'chi-square' chi-square statistic,
'd.f' the number of degrees of freedom, and
'probability' the probability.

Options: PRINT, GROUPS.
Parameters: DATA, VARIANCES, DF, SAVE.

Method

If the raw data have been given as input, the procedure uses TABULATE to form tables of variances, and of replications from which the degrees of freedom are calculated. The test statistic is calculated as M/C, where

M = ∑ ni × log( ∑{ ni × si } / ∑{ ni } ) – ∑{ ni × log( si ) }

C = 1 + ( 1 / ( 3 × (N – 1) ) ) × ( ∑{ 1/ni } – 1 / ( ∑ ni ) )

N = number of groups

ni = degrees of freedom of group i

si = variance of group i

The number of degrees of freedom associated with the test statistic is the number of groups minus one. See, for example, Snedecor & Cochran (1980, pages 252-253).

The FSSPM directive is used to form variance-covariance matrices. The equivalent test of homogeneity is given by Box (1950).

Action with RESTRICT

If the DATA variates are restricted, only the units not excluded by the restriction will be used to calculate the variances and degrees of freedom.

References

Box, G.E.P. (1950). Problems in the analysis of growth and wear curves. Biometrics, 6, 362-389.

Snedecor, G.W. & Cochran, W.G. (1980). Statistical Methods (seventh edition). Iowa State University Press, Ames, Iowa.

See also

Directive: VSTRUCTURE.

Procedure: AREPMEASURES.

Commands for: Basic and nonparametric statistics.

Example

CAPTION 'VHOMOGENEITY example',\
        !t('Data from Snedecor & Cochran (1980), Statistical Methods',\
        '(7th edition), pages 216, 252 and 253.');\ 
        STYLE=meta,plain
FACTOR  [LEVELS=4; VALUES=(1...4)6] Fat
VARIATE [VALUES=64,78,75,55, 72,91,93,66, 68,97,78,49,\ 
                77,82,71,64, 56,85,63,70, 95,77,76,68] Absorbed
CAPTION !t('Supply the data values (page 216), and calculate variances',\
        'and degrees of freedom within the procedure.')
VHOMOGENEITY [GROUPS=Fat] Absorbed; VARIANCES=Var; DF=df
PRINT   Var,df; DECIMALS=2,0
CAPTION 'Supply the variances and degrees of freedom (page 253).'
VHOMOGENEITY DATA=*; VARIANCES=!(0.909,0.497,0.076,0.103,0.146);\ 
                     DF       =!(    9,    7,    9,    7,    5)

CAPTION !t('Testing of variance-covariance matrices:',
        'data from Winer (1962), Statistical Principals in Experimental',\
        'Design (2nd edition), McGraw-Hill, New York, page 597.')
FACTOR  [LEVELS=2; VALUES=5(1,2)] Groups
POINTER [NVALUES=3]  Data
VARIATE [NVALUES=10] Data[1,2,3]
READ    Data[1,2,3]
4 7 2  3 5 1  7 9 6  6 6 2  5 5 1  8 2 5  4 1 1  6 3 4  9 5 2  7 1 1 :
VHOMOGENEITY [GROUPS=Groups] DATA=Data
Updated on October 28, 2020

Was this article helpful?