Chi-Square Test of Independence Interpretation

Discuss statistics related things
Post Reply
Beth
Posts: 9
Joined: Tue Jan 17, 2023 12:27 pm

Chi-Square Test of Independence Interpretation

Post by Beth »

Hi,
I'm using the test of independence and I have a hard time interpreting it. In addition to 2 variables (gender and food type), I have a 3rd one (location) that I added as a layer. My aim is to see whether there's an association between gender, food type and location. I put the location variable as the layer instead of gender because the outcome seems to be the same but it's easier to read. But I'm having trouble interpreting the association since I couldn't find a tutorial on how to interpret the results with the layer added.
As far as I understand, there is a separate X^2 value for each location type (the layer variable). For each of them, if they are significant, it means there's a dependency, but with what? Which variable it is dependent with I can't tell. Also, if the test is significant, how do I know where exactly that dependency is? I'd appreciate if you could guide me, thanks!
(I'm attaching the output screenshots)
Attachments
chi-square layer.PNG
chi-square layer.PNG (11.57 KiB) Viewed 3940 times
contingency table.PNG
contingency table.PNG (20.32 KiB) Viewed 3940 times
User avatar
MAgojam
Posts: 421
Joined: Thu Jun 08, 2017 2:33 pm
Location: Parma (Italy)

Re: Chi-Square Test of Independence Interpretation

Post by MAgojam »

Hey @Beth,

may I suggest you shift your attention from the Frequencies->Independent Samples ribbon item to Frequencies->Log-Linear Regression which will give you the answers you are looking for.
Log-linear analysis (Multi-way Frequency Tables) is appropriate when the research goal is to determine whether there is a statistically significant relationship between three or more discrete variables, and it might be of interest to take a look at
Tabachnick, B. G. & Fidell, L. S. (2019). Using multivariate statistics (7th ed.). Boston, MA: Pearson.

Cheers,
Maurizio
Beth
Posts: 9
Joined: Tue Jan 17, 2023 12:27 pm

Re: Chi-Square Test of Independence Interpretation

Post by Beth »

Hi Maurizio,

Thank you for your answer. I've been looking up the log-linear regression (I've never done it before) and something in the output is confusing me. As can be seen in the output screenshot, I added 3 factors to the model and I'm interested in the 3-way interaction. The counts variable gives the frequency of "food type" variable's placement on "location" variable. I need to see whether females and males differ in terms of placement preference of food stimuli in different locations. Say, males placed the UhLc item on the top_center 300 times and females did it 420 times. I wonder if (for each combination of food type and location levels) there's a significant difference between males and females.
The problem I'm having is, the output gives comparisons with different levels. As far as I understand, the first row of the interaction compares Males*UhHc*top_center with Females*UhLc*top_left. But I need to compare the same food type and location level for males and females. Perhaps there's something I'm missing in this analysis since I'm new to it, but it seems to me that since the test of independence directly shows the observed and expected counts for males and females side by side, it fits my aim better.
So do you think log-linear is still better for my data or is it just me not understanding the analysis?

Thank you so much for taking your time,
Beth
Attachments
log-linear regression.PNG
log-linear regression.PNG (30.92 KiB) Viewed 3924 times
User avatar
MAgojam
Posts: 421
Joined: Thu Jun 08, 2017 2:33 pm
Location: Parma (Italy)

Re: Chi-Square Test of Independence Interpretation

Post by MAgojam »

Beth wrote: So do you think log-linear is still better for my data ...
Sure, that's why I suggested it to you, if we're interested in understanding the relationship between all three variables without one necessarily being the "response" then we might want to try a loglinear model.
Loglinear models model cell counts in contingency tables.
They’re a little different from other modeling methods in that they don’t distinguish between response and explanatory variables. All variables in a loglinear model are essentially “responses”.
I've been looking up the log-linear regression (I've never done it before) and something in the output is confusing me.
It fits and for this reason there was also an invitation to read it, but don't let it fall and delve into the topic.
The problem I'm having is, the output gives comparisons with different levels. As far as I understand, the first row of the interaction compares Males*UhHc*top_center with Females*UhLc*top_left.
Your screenshot is just a sliver of a saturated model (it would be better to have more models to see how they approximate the observed values), but how do we describe the association between the variables? What effect do variables have on each other? To answer we look at the coefficients of the interactions.
By exponentiating the coefficients, we obtain probability ratios.
For example, if we take a look at the coefficient (Estimate = 0.4037) of the first row of your model, we can say that choosing a FoodType UhHc rather than a FoodType UhLc, in a Location top_center rather than in a Location top-left is 1.5 more probable for the male gender than for the female gender, and so on.

A little quick so as not to leave you without an answer.
Cheers,
Maurizio
User avatar
reason180
Posts: 278
Joined: Mon Jul 24, 2017 4:56 pm

Re: Chi-Square Test of Independence Interpretation

Post by reason180 »

I wonder if logistic generalized linear model would be more easily interpretable (see the gamlj module) since it includes familiar, AMOVA-like output--i.e., main effects and interactions for categorical predictors.
Beth
Posts: 9
Joined: Tue Jan 17, 2023 12:27 pm

Re: Chi-Square Test of Independence Interpretation

Post by Beth »

Thank you Maurizio for your detailed answer. I will dive deeper into learning the analysis. Thanks for the example, I understand how to interpret it now. I guess I was just a bit disappointed to learn that the possibility ratios are for different food types and locations for males and females as opposed to comparing the same food type - location combination for males and females.
Post Reply