1
$\begingroup$

In a cross table, if the adjusted residual value for a cell is less than -1.96 or greater than 1.96 then we could say that this cell is determinant in the dependency (suppose pearson is 0.03). However, is this sign really important? I mean, if I get -2.5 can I say that the variables are negatively correlated? I'm creating a cross table with two variables: cluster membership (generated by kmeans) and a few company characteristics. So, If I get this -2.5 in a cell (cluster 3 x industrial companies), could I say that cluster 3 is "poor" of industrial companies?

Thank you.

$\endgroup$
  • $\begingroup$ Since your attributes are binary, I would be careful with the term correlation. It's more of a co-occurence thing. Try rewriting the correlation formula into a count-based formula. $\endgroup$ – Has QUIT--Anony-Mousse Oct 19 '12 at 6:34
1
$\begingroup$

It's hard to tell what you're asking here, but the residuals in a crosstab indicate whether the observed value is greater or smaller than the expected value.

If you get -2.5 you can conclude something about the number of companies in cluster 3 and whatever column had that cell in it. But what is the other variable? If it is "type of company" (e.g. industrial, service,.... etc) then it would mean cluster 3 had fewer than expected industrial companies.

One note: saying categorical variables are "negatively correlated" makes no sense.

$\endgroup$
  • $\begingroup$ Thank you, @PeterFlom. The other variable would be type of company(Services, Industrial, Commercial). $\endgroup$ – neilsoncarlos Oct 18 '12 at 20:50
  • $\begingroup$ You're welcome. If my answer is what you need, you can accept it by clicking the check mark. $\endgroup$ – Peter Flom Oct 18 '12 at 20:52
  • $\begingroup$ Sorry, I just edited the post. You asked me about the other variable. Thanks again $\endgroup$ – neilsoncarlos Oct 18 '12 at 20:56
2
$\begingroup$

The null hypothesis for a $\chi^2$ analysis of a contingency table is that the rows and columns are independent of each other. Under this null model, the expected count is: $$ \hat E_{ij}=\left(\frac{\sum_j n_{ij}}{N}\right)\left(\frac{\sum_i n_{ij}}{N}\right)N $$ In English: The row sum divided by the total $N$ is the probability of finding an observation in that row; the column sum over the total is the probability of finding an observation in that column; and if the rows and columns are independent, the probability of finding an observation in that cell is just the product of the marginal probabilities, and the expected count for that cell is simply that proportion of the total $N$.

What seems to be less well-known is that there can be residuals computed when your data are compared to the null model. For example, the Pearson residual for a cell in a contingency table is: $$ r_{ij}=\frac{O_{ij}-\hat{E}_{ij}}{\sqrt{\hat{E}_{ij}}} $$ I gather these are the residuals you are referring to.

These residuals are useful in visualizing contingency table data. For example, they are often used to 'shade' the boxes in a mosaic plot to make it immediately apparent which cells are out of line with expectations, in which direction, and by how much. (You can see an example of this in the mosaic [2nd] plot I posted in my recent question on visualizing contingency table data; note the legend explaining the colors on the side of the plot.)

Having covered these topics, we can answer your question easily: The sign indicates whether the number of observations with those particular characteristics (i.e., row and column classifications) is 'too many' (positive) or 'too few' (negative) relative to what would have been expected under the null model. The larger the residual is, the further that cell count diverges from what would have been expected under the null model. There is no evaluative component to this; positive residuals aren't 'better' than negative residuals. Finally, I agree with @PeterFlom that it makes no sense to say that categorical variables are "negatively correlated".

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.