+ Reply to Thread
Results 1 to 7 of 7

Thread: How to study association between categorical variables?

  1. #1
    Points: 3,621, Level: 37
    Level completed: 81%, Points required for next Level: 29
    askazy's Avatar
    Location
    Holand
    Posts
    160
    Thanks
    4
    Thanked 0 Times in 0 Posts

    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?
    The difference between stupidity and genius is that genius has its limits.
    "Albert Einstein"

  2. #2
    Omega Contributor
    Points: 38,396, Level: 100
    Level completed: 0%, Points required for next Level: 0
    hlsmith's Avatar
    Location
    Not Ames, IA
    Posts
    7,001
    Thanks
    398
    Thanked 1,186 Times in 1,147 Posts

    Re: How to study association between categorical variables?

    You can answer all of your questions with one single multiple logistic regression model.
    Stop cowardice, ban guns!

  3. #3
    Points: 3,621, Level: 37
    Level completed: 81%, Points required for next Level: 29
    askazy's Avatar
    Location
    Holand
    Posts
    160
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Re: How to study association between categorical variables?

    Quote Originally Posted by hlsmith View Post
    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.
    The difference between stupidity and genius is that genius has its limits.
    "Albert Einstein"

  4. #4
    Omega Contributor
    Points: 38,396, Level: 100
    Level completed: 0%, Points required for next Level: 0
    hlsmith's Avatar
    Location
    Not Ames, IA
    Posts
    7,001
    Thanks
    398
    Thanked 1,186 Times in 1,147 Posts

    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!
    Stop cowardice, ban guns!

  5. #5
    Points: 3,621, Level: 37
    Level completed: 81%, Points required for next Level: 29
    askazy's Avatar
    Location
    Holand
    Posts
    160
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Re: How to study association between categorical variables?

    Quote Originally Posted by hlsmith View Post
    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?
    The difference between stupidity and genius is that genius has its limits.
    "Albert Einstein"

  6. #6
    Points: 3,621, Level: 37
    Level completed: 81%, Points required for next Level: 29
    askazy's Avatar
    Location
    Holand
    Posts
    160
    Thanks
    4
    Thanked 0 Times in 0 Posts

    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)
    The difference between stupidity and genius is that genius has its limits.
    "Albert Einstein"

  7. #7
    Omega Contributor
    Points: 38,396, Level: 100
    Level completed: 0%, Points required for next Level: 0
    hlsmith's Avatar
    Location
    Not Ames, IA
    Posts
    7,001
    Thanks
    398
    Thanked 1,186 Times in 1,147 Posts

    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?
    Stop cowardice, ban guns!

+ Reply to Thread

           




Posting Permissions

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






Advertise on Talk Stats