Login  Register

Re: Interpreting Contingency table analysis & z-tests results - PLEASE HELP!

Posted by Bruce Weaver on May 27, 2011; 8:37pm
URL: http://spssx-discussion.165.s1.nabble.com/Interpreting-Contingency-table-analysis-z-tests-results-PLEASE-HELP-tp4412140p4433351.html

I've never used the z-tests you refer to, so gave it a try as follows:

data list list / habitat detected kount (3f5.0).
begin data
1 1   1
1 2  45
2 1   4
2 2 123
3 1   3
3 2 175
4 1  40
4 2 156
5 1  18
5 2 123
end data.

var lab
 habitat "Habitat"
 detected "Detected"
.
val lab
 habitat 1 "A" 2 "B" 3 "C" 4 "D" 5 "E" /
 detected 1 "Yes" 2 "No"
.

weight by kount.

* Custom Tables.
CTABLES
  /VLABELS VARIABLES=habitat detected DISPLAY=DEFAULT
  /TABLE habitat [COUNT F40.0] BY detected
  /CATEGORIES VARIABLES=habitat detected ORDER=A KEY=VALUE EMPTY=INCLUDE
  /SIGTEST TYPE=CHISQUARE ALPHA=0.05 INCLUDEMRSETS=YES CATEGORIES=ALLVISIBLE
  /COMPARETEST TYPE=PROP ALPHA=0.05 ADJUST=BONFERRONI ORIGIN=COLUMN INCLUDEMRSETS=YES
    CATEGORIES=ALLVISIBLE MERGE=NO.


Does this generate the same z-test results you have?  For those who cannot run the syntax, the z-test output looks like this:

Comparisons of Column Proportions^a
        Yes No
A
B A
C A
D B
E

Results are based on two-sided tests with significance level 0.05. For each significant pair, the key of the category with the smaller column proportion appears under the category with the larger column proportion.

a. Tests are adjusted for all pairwise comparisons within a row of each innermost subtable using the Bonferroni correction.

It may be a Friday afternoon thing, but it is not immediately clear to me how to read those results.  

Here are the column percentages, by the way:

        Yes No
A 1.52% 7.23%
B 6.06% 19.77%
C 4.55% 28.14%
D 60.61% 25.08%
E 27.27% 19.77%


If you do have specific a priori contrasts in mind, you might be better off partitioning the overall table in a way that addresses those questions.  I have some examples of that in a chapter of notes on chi-square analysis -- item 3 here:  https://sites.google.com/a/lakeheadu.ca/bweaver/Home/statistics/notes.  Notice that for this approach, the likelihood ratio chi-square works out better than Pearson's statistic, because orthogonal components that should  add up to a whole DO add up to the whole.

HTH.


DP_Sydney wrote
Hi all,

 I have completed a 5x2 contingency table in SPSS which returned a significant chi-square value (P<0.001). My columns are species detected/not detected in surveys and the rows are different habitats (see data below). I expected the proportion of detected to not-detected to differ between habitats. So all good here.

 I followed this up with z-tests (under the 'Custom Table' option) which detected significant differences in column proportions for three of the habitats (=rows) (B,C,D). B and C had lower proportions of surveys detecting the species and D had greater than expected.

 However, the 'reporting rate' of the species (i.e. the number of surveys that detected the species as a percentage of total surveys, which equals the row percentage in the contingency table) was highest in habitat D (20.4% - no surprises there), AND in E (12.8%) which showed no significant difference in proportions. All other row percentages were below 4%.

 Furthermore, in a 2x2 table just comparing habitat D and E (which from a priori reasons were the only habitats I expected to have a greater proportion of detected surveys - which they did as row percentages but not in z-tests) there was no difference between them (exact p = 0.079).

 I'm confused about how to interpret these results. What exactly does a significant z-test tell me about the proportions of detected/not-detected? Does a significantly greater than expected proportion of detected in habitat X not equate to a significantly lower than expected proportion of not-detected in habitat X? Can I still take note of the fact that in the habitat of row 5 the 'reporting rate' was still high relative to other habitats except D?

The data are as follows (standardised residuals in parentheses)
                        Detected            Not Detected           % detected (row %)
A   Obs              1 (-1.6)             45 (0.5)                   2.2
     Exp              4.4                   41.6
B   Obs              4 (-2.3)             123 (0.8)                  3.1
     Exp              12.2                  114.8
C   Obs              3 (-3.4)             175                         1.7
     Exp              17.1                  160.9
D   Obs              40 (4.9)             156 (-1.6)                20.4
     Exp              18.8                  177.2
E   Obs              18 (1.2)             123 (-0.4)                12.8
     Exp              13.5                  127.5

Hope anyone can help! :-)

Thanks in advance,

Dean
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

PLEASE NOTE THE FOLLOWING: 
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/).