Pairwise Comparisons of Proportions and Means: COMPARETEST Subcommand (CTABLES command)

 
 /COMPARETEST TYPE= {PROP}  ALPHA= {value, value}
                    {MEAN}

          ADJUST= {BONFERRONI}  
                  {BH        }
                  {NONE      }

          INCLUDEMRSETS={YES}  MEANSVARIANCE={ALLCATS   }
                        {NO }                {TESTEDCATS}

          CATEGORIES={ALLVISIBLE}
                     {SUBTOTALS }

          MERGE={NO }
                {YES}

          STYLE={APA   }
                {SIMPLE}

          SHOWSIG={NO }
                  {YES}
TYPE
The type of pairwise comparison.
PROP
Comparison of column proportions. The table must have a categorical row variable and a categorical column variable. The table must include counts or percentages.
MEAN
Comparison of column means. The test variable must be a scale (continuous) variable, and the table must include the MEAN summary statistic.
ALPHA
The significance level for the test.
  • The value must be greater than 0 and less than 1. The default value is 0.05.
  • You can specify two significance levels, separated by spaces or commas.
  • If you specify two significance levels, capital letters are used to identify significance values less than or equal to the smaller level. Lower case letters are used to identify significance values less than or equal to the larger level.
  • If MERGE=YES and STYLE=APA, the second significance level is ignored.
ADJUST
The method for adjusting p values for multiple comparisons.
BONFERRONI
Bonferroni correction. This method adjusts for the family-wise error rate (FWER).
BH
Benjamini-Hochberg false discovery rate (FDR). This method is less conservative than the Bonferroni correction.
NONE
No adjustment for multiple comparisons.
INCLUDEMRSETS=NO | YES
Include multiple response variables in tests. If there are no multiple response sets, this keyword is ignored.
MEANSVARIANCE
Computation of variance for means test. This keyword is ignored unless TYPE=MEAN.
ALLCATS
For ordinary categorical variables, variance is estimated from all categories.
TESTEDCATS
For ordinary categorical variables, variance is estimated from the categories that are compared. The variance for the means test is always based on the categories that are compared for multiple response tests.
CATEGORIES
Use categories or subtotals for significance tests.
ALLVISIBLE
Significance tests are performed on regular categories. If regular categories are hidden, tests are performed on subtotals.
SUBTOTALS
For any categories included in a defined subtotal, tests are performed on the subtotals.
MERGE=NO | YES
Merge significance indicators into the main table. If NO is specified, significant differences are indicated in a separate table that follows the main table. If YES is specified, significance differences indicators are merged with the main table.
STYLE
The format for the significance indicators in the main table. This keyword is ignored if MERGE=NO.
APA
APA-style subscripts are used to indicate significant differences. This setting is the default.
SIMPLE
Each column category in the table is identified with an alphabetic key. For each significant pair, the key of the category with the smaller column mean or proportion appears in the category with the larger column mean or proportion.
SHOWSIG=NO |YES
Display the significance values. The default value is NO. If YES is specified, significance values are displayed in parentheses. Significance values are only displayed when the test results are displayed in a separate table. If SHOWSIG=YES and MERGE=YES, the MERGE specification is ignored and the test results are displayed in a separate table.
ORIGIN
This keyword is deprecated and has no effect.

Significance tests are not computed for post-computed categories specified on the PCOMPUTE subcommand.

Example

CTABLES /TABLE AGECAT BY MARITAL 
  /CATEGORIES VARIABLES=AGECAT MARITAL TOTAL=YES
  /COMPARETEST TYPE=PROP ALPHA=.01.
Figure 1. Significance test for column differences
Significance test for column differences
  • The table of counts is identical to that shown in the example for chi-square above.
  • The comparison output shows a number of predictable pairs for marital status among different age groups that are significant at the 0.01 level that is specified with ALPHA in the command.

Example

CTABLES /TABLE AGE > SEX BY MARITAL 
  /CATEGORIES VARIABLES=SEX TOTAL=YES
  /COMPARETEST TYPE=MEAN.
Figure 2. Results with column difference significance in separate table
Results with column difference significance in separate table
Figure 3. Separate table of column difference significance
Separate table of column difference significance