Skip to main content
8 events
when toggle format what by license comment
Jun 24, 2014 at 21:26 comment added shadowtalker You could do that for every combination of 1's and 0's for subjects (so a plot for "POLLUTION", a plot for "LITIGATION & POLLUTION", etc). You could then ghost the actual (jittered) data right on top of the boxplot to see how well it matches. Or put an empirical box plot and a predicted box plot side by side. Haven't seen that one before but I like it. What I have recently seen is boxplots of the coefficients themselves, where the boxes and whiskers are derived from the standard errors.
Jun 24, 2014 at 19:48 vote accept cptn
Jun 24, 2014 at 19:48 comment added cptn @ ssdecontrol: Thanks a lot for your explanation! Have you got an idea on how to visualize/plot the effects of such a regression? Boxplots for the three categories positive, negative and neutral for each of the subjects? Is that possible?
Jun 24, 2014 at 14:07 history edited shadowtalker CC BY-SA 3.0
added a link
Jun 24, 2014 at 14:01 comment added shadowtalker First question: Yes, dummy variables (and by extension categorical variables) have to be exclusive, but that's not a problem here. Each variable is exclusive within itself: e.g. the article is either about pollution or it isn't and that covers the entire space of possibility. If you're confused about why you don't have to leave out one of those dummy variables, it's precisely because they don't come from the same categorical variable.
Jun 24, 2014 at 13:54 comment added shadowtalker Second question first: Categorical variables are not the same as dummy variables. "Class," "region," and "subject" are categorical. Dummy variables are always binary. The way categorical variables are typically handled is by making a new dummy variable for each category and, yes, leaving one out as a baseline. You have three categorical variables. Each will need its own set of dummies. In lm, R does this for you automatically if it detects that a variable has class (or should be coerced to class) factor.
Jun 24, 2014 at 7:09 comment added cptn Thanks for your answer! I've still got some questions. Look at the first row of ´df2´. This article is about litigation AND pollution! isn't this a problem? I mean, doesn't a dummy variable need to be exclusive like male/female? And another thing: let's assume i have a model with the three dummy variables "class" (3 levels), "region" (5 levels) and "subject" (3 levels). Do I need to leave out one of the levels for EACH of the three dummy variables in the model?
Jun 22, 2014 at 9:56 history answered shadowtalker CC BY-SA 3.0