The GAILSIMON option in the TABLES statement provides the GailSimon test for qualitative interaction for stratified tables. For details, see Gail and Simon (1985); Silvapulle (2001); Dmitrienko et al. (2005).
The GailSimon test is based on the risk differences in stratified tables, where the risk difference is defined as the row 1 risk (proportion in column 1) minus the row 2 risk. See the section Risks and Risk Differences for details. By default, the procedure uses column 1 risks to compute the GailSimon test. If you specify the GAILSIMON(COLUMN=2) option, the procedure uses column 2 risks.
PROC FREQ computes the GailSimon test statistics as described in Gail and Simon (1985),









where is the risk difference in table h, is the standard error of the risk difference, and equals 1 if and 0 otherwise. Similarly, equals 1 if and 0 otherwise. The q tables (strata) are indexed by .
The pvalues for the GailSimon statistics are computed as









where is the cumulative chisquare distribution function with h degrees of freedom and is the binomial probability function with parameters n and p. The statistic Q tests the null hypothesis of no qualitative interaction. The statistic tests the null hypothesis of positive risk differences. A small pvalue for indicates negative differences; similarly, a small pvalue for indicates positive risk differences.