Example (CSLOGISTIC command)
Suppose that dependent variable Y is binary, and factors A and B each have three levels.
CSLOGISTIC y BY a b
/PLAN FILE='/survey/myfile.csplan'
/MODEL a b a*b
/CUSTOM LABEL = ‘Effect A’
LMATRIX = a 1 0 -1
a*b 1/3 1/3 1/3
0 0 0
-1/3 -1/3 -1/3;
a 0 1 -1
a*b 0 0 0
1/3 1/3 1/3
-1/3 -1/3 -1/3.
- The preceding syntax specifies a test of effect A.
- Because there are three levels in effect A, two independent contrasts can be formed at most; thus, there are two rows in the L matrix, separated by a semicolon (;).
- There are three levels each in effects A and B; thus, the interaction effect A*B takes nine columns in the design matrix.
- The first row in the L matrix tests the difference between levels 1 and 3 of effect A; the second row tests the difference between levels 2 and 3 of effect A.
- The
KMATRIX
keyword is not specified, so the null hypothesis value for both tests is 0.