TEST Subcommand (MIXED command)
The TEST
subcommand
allows you to customize your hypotheses tests by directly specifying
null hypotheses as linear combinations of parameters.
- Multiple
TEST
subcommands are allowed. Each is handled independently. - The basic format for the
TEST
subcommand is an optional list of values enclosed in a pair of parentheses, an optional label in quotes, an effect name or the keywordALL
, and a list of values. - When multiple linear combinations are specified within
the same
TEST
subcommand, a semicolon (;) terminates each linear combination except the last one. - At the end of a contrast coefficients row, you can
use the option
DIVISOR=value
to specify a denominator for coefficients in that row. When specified, the contrast coefficients in that row will be divided by the given value. Note that the equals sign is required. - The value list preceding the first effect or the
keyword
ALL
contains the constants, to which the linear combinations are equated under the null hypotheses. If this value list is omitted, the constants are assumed to be zeros. - The optional label is a string with a maximum length
of 255 bytes. Only one label per
TEST
subcommand can be specified. - The effect list is divided into two parts. The first part is for the fixed effects, and the second part is for the random effects. Both parts have the same syntax structure.
- Effects specified in the fixed-effect list should
have already been specified or implied on the
FIXED
subcommand. - Effects specified in the random-effect list should
have already been specified on the
RANDOM
subcommand. - To specify the coefficient for the intercept, use
the keyword
INTERCEPT
. Only one value is expected to followINTERCEPT
. - The number of values following an effect name must be equal to the number of parameters (including the redundant ones) corresponding to that effect. For example, if the effect A*B takes up to six parameters, then exactly six values must follow A*B.
- A number can be specified as a fraction with a positive denominator. For example, 1/3 or –1/3 are valid, but 1/–3 is invalid.
- When
ALL
is specified, only a list of values can follow. The number of values must be equal to the number of parameters (including the redundant ones) in the model. - Effects appearing or implied on the
FIXED
andRANDOM
subcommands but not specified onTEST
are assumed to take the value 0 for all of their parameters. - If
ALL
is specified for the first row in aTEST
matrix, then all subsequent rows should begin with theALL
keyword. - If effects are specified for the first row in a
TEST
matrix, then all subsequent rows should use the effect name (thusALL
is not allowed). - When
SUBJECT( )
is specified on aRANDOM
subcommand, the coefficients given in theTEST
subcommand will be divided by the number of subjects of that random effect automatically.
Example
MIXED Y BY A B C
/FIX = A
/RANDOM = B C
/TEST = 'Contrasts of A' A 1/3 1/3 1/3; A 1 -1 0; A 1 -1/2 -1/2
/TEST(1) = 'Contrast of B' | B 1 -1
/TEST = 'BLUP at First Level of A'
ALL 0 1 0 0 | 1 0 1 0;
ALL | 1 0 0 1;
ALL 0 1 0 0;
ALL 0 1 0 0 | 0 1 0 1.
Suppose that factor A has three levels and factors B and C each have two levels.
- The first
TEST
is labeled Contrasts of A. It performs three contrasts among levels of A. The first is technically not a contrast but the mean of level 1, level 2, and level 3 of A, the second is between level 1 and level 2 of A, and the third is between level 1 and the mean of level 2 and level 3 of A. - The second
TEST
is labeled Contrast of B. Coefficients for B are preceded by the vertical bar (|) because B is a random effect. This contrast computes the difference between level 1 and level 2 of B, and tests if the difference equals 1. - The third
TEST
is labeled BLUP at First Level of A. There are four parameters for the fixed effects (intercept and A), and there are four parameters for the random effects (B and C). Coefficients for the fixed-effect parameters are separated from those for the random-effect parameters by the vertical bar (|). The coefficients correspond to the parameter estimates in the order in which the parameter estimates are listed in the output.
Example
Suppose that factor A has three levels and factor B has four levels.
MIXED Y BY A B
/FIXED = A B
/TEST = 'test example' A 1 -1 0 DIVISOR=3;
B 0 0 1 -1 DIVISOR=4.
- For effect A, all contrast coefficients will be divided by 3; therefore, the actual coefficients are (1/3,–1/3,0).
- For effect B, all contrast coefficients will be divided by 4; therefore, the actual coefficients are (0,0,1/4,–1/4).