3
$\begingroup$

What is your go to method to visualize relationships between categorical variables?

At work, I find myself working with a discrete outcome variables quite a bit. When exploring data, I often want to see how each predictor behaves with the outcome variable. Were they both continuous, I'd hop in to ggplot2 and whip up a scatter plot. If just one were continuous I'd use a jitter or box-and-whisker plot. But what if they are both categorical?

Thanks!

$\endgroup$
1
$\begingroup$

Depends on the situation. Side-by-side bar plots work, with percentages for each category. Stacked bar plots are sometimes easier to see effects. Since it looks like you are in an exploring kind of mood, check out the vcd and vcdExtra packages in R. vcd stands for visualizing categorical data... so it seems up your alley.

$\endgroup$
0
0
$\begingroup$

I think a bar chart would do the job with different colours for the categories within groupings.

$\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.