# Thread: How to study association between categorical variables?

1. ## How to study association between categorical variables?

I have 4 categorical variables in a dataset let X1, X2, X3 and Y. Where X1,X2 and Y is a binary random variable and X3 have 3 categories.

X1,X2 and X3 are independent variables and Y is the response variable

How can I study the association of X1and Y fixing/controlling X2 and X3?

How can I study the association of X2 and Y considering the four variables?

What's the better way to do that? Boxplots? Using wald.test?

2. ## Re: How to study association between categorical variables?

You can answer all of your questions with one single multiple logistic regression model.

3. ## Re: How to study association between categorical variables?

Originally Posted by hlsmith
You can answer all of your questions with one single multiple logistic regression model.
A part of problem is fit a Logistic regression model, but this question comes first so was thinking maybe I can see the association with some graph.

4. ## Re: How to study association between categorical variables?

Well if you want to control for the other variables they all need to be in the same model. There are plots of logodds and differences but they usually require you to set the other variables to a reference.

Keep questions coming!

5. ## Re: How to study association between categorical variables?

Originally Posted by hlsmith
Well if you want to control for the other variables they all need to be in the same model. There are plots of logodds and differences but they usually require you to set the other variables to a reference.

Keep questions coming!
My data following this format http://www.talkstats.com/showthread....for-count-data .

I want to verify is exists any association between severity of accident and use of helmet.

I want to verify if exists any association between severity of accident and speed.

I can show this association just with graphs in R?

6. ## Re: How to study association between categorical variables?

How I can make in R barplot's for this data

Code:
``````Helmet  Speed  Not_Severe Severe Total
Yes     10-15  10         6      16
Yes     15-20  10         12     22
Yes     20-25  22         13     35
No      10-15  15         4      19
No      15-20  18         9      27
No      20-25  6          15     21``````
I want to make a barplot of each variable doing

- Barplot for Helmet : With 4 bar's, where I have (Yes,Not_Severe), (Yes,Severe), (No,Not_Severe), (No,Severe)

-Barplot for speed: With 6 bar's where I have (10-15,Not_severe), (10-15,Severe), (15-20,Not_severe),(15-20,Severe), (20-25,Not_severe),(20-25,Severe)

7. ## Re: How to study association between categorical variables?

Are there any suspected interactions, mediating effects, or collinearity? I would just think about that when graphing or interpreting the graphs.

Can we see the graphs?

 Tweet

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts