# Is there a way to compare multiple means using the MEANS analytic option in SDA?

Yes. There are ways to compare multiple means (k-1 comparisons) in terms of differences using the Comparison of MEANS program in SDA. Note that if a dependent variable is coded as 0/1, then the mean of the dependent variable is essentially the proportion.

In the MEANS program, there are different dropdown options when selecting from the *main statistic to display*. The default setting is to display the means of the dependent variable against the Row variable categories. However, the *differences from Row category* option allows you to choose a base category. When you run the analysis for this selection, the result produced in each of the other row cells is the difference between that cell's mean and the base Row category cell mean. The above selection along with the *z/t-statistic and p-value* options produce the (k-1) comparisons of means or proportions and associated statistics from a single means run.

Alternatively in a two-way classification, if your MEANS analysis includes an optional COLUMN variable, you can choose to display the results as *differences from Column (or Row) category*. This option allows you to choose a base column category and the results for each of the other column cells show the difference between that cell mean and the base column category cell.

NOTE: The computing in the R-DAS analysis system is equivalent to the Frequencies/Crosstabulation program module in SDA It is not possible to perform a (k-1) means or proportions comparison using the R-DAS or SDA Frequencies/Crosstabulation program, while it is possible to perform a test of homogeneity of row (or column) percents for a two-way table. There is a separate FAQ on How do I perform a homogeneity of proportions or percentages using the Frequencies/Crosstab program in R-DAS?

NOTE: In multiple comparisons testing, there are k(k-1)/2 differences of means or proportions being compared from k populations (or subpopulations or subgroups). In a single run, the MEANS program enables us to simultaneously test the differences of (k-1) pair of means from a base category of a k category classification variable. So you will have k(k-1)/2 distinct comparison tests after choosing a different base category each time from (k-1) separate MEANS program runs. For a Row variable with k=4 levels (say, A, B, C and D), you will obtain 6 tests of difference of means (i.e., B-A, C-A, D-A for base reference A, C-B, D-B for base reference B and D-C for base reference C) from 3 (=4-1) separate MEANS program run when A, B, and C are used as base categories respectively.

Additional information on using the "Main statistic to display" option in the MEANS program can be found here: http://www.icpsr.umich.edu/SDAHELP/helpan.htm#mstats