Hypothetical data-set:

There's a dependent binomial variable 'happiness', with $0 = unhappy$ and $1 = happy$. Then there's an independent categorical variable 'color' with the levels $blue, red, green, pink$.

We know that each color has a strong influence on the level of happiness, and we can measure that. Imagine that $blue$ and $red$ gave more happiness and $green$ and $pink$ less happiness. But now someone says "there's an overall tendency towards unhappiness in this data, beyond and in addition to the effect of color". How can I test that?

A clarification of what I have in mind:

In the hypothetical data set above, say that the average happiness $=0.61$. At the same time, however, this is because there just happens to be a lot of $blue$ and $red$ among the colors, which we know cause happiness. In a different population with the same distribution and effect of colors, the average happiness $=0.72$. The reason why the average happiness in these two populations is different, therefore, must be because their "baseline happiness" is different. If the only information we have is the data set for the population where the average happiness $=0.61$, is there any way to detect this "baseline happiness"?

  • $\begingroup$ Why not just ignore the independent variable? $\endgroup$ – shadowtalker Mar 14 '15 at 6:16
  • $\begingroup$ When I answered this question 10 hours ago it seemed quite clear (and seems to fit ssdecontrol's interpretation as well). Now with the edit, I have no idea how to parse the phrase "independent of color", since what's being discussed in the edit is clearly dependent on color (happiness is now different because of differences in color). The question will have to be made more precise. I imagine this will require explicit mathematical definition, or something from which mathematical definition is obvious. $\endgroup$ – Glen_b Mar 14 '15 at 14:30
  • $\begingroup$ @Glen_b I don't want to insist on the wording "independent". It might have been the wrong word. Now I say "beyond (and in addition to)". Maybe those are not the best words either. But please look beyond my choice of words here. I hope the scenario I'm giving is clear enough? Another simple example. A group of happy people get happier when I give them chocolate. Another group of unhappy people also get happier when I give them chocolate. The level of happiness in these two groups will be different, but this difference is there not because of the effect of chocolate, but because their baseline $\endgroup$ – Sverre Mar 14 '15 at 14:59
  • 1
    $\begingroup$ I can't look beyond your choice of words, since I only have your choice of words from which to infer meaning -- you offer nothing other than your choice of words for anyone to interpret. However, you do seem to be getting closer to a question that someone might like to answer. Please clarify the text of your question. $\endgroup$ – Glen_b Mar 14 '15 at 15:02
  • 1
    $\begingroup$ My comment was suggesting that your recent comments convey something I don't think is as clearly expressed in your question. $\endgroup$ – Glen_b Mar 14 '15 at 15:07

Everyone has to be (like? see?) one of the four colours, so the notion of a colourless "baseline happiness" isn't meaningful. Whether you consider blue, say, as a reference level, & describe the effects of each other colours as a deviation from that, or consider the effects of each colour as a deviation from the mean proportion happy of 0.61, is an arbitrary choice resulting in substantively equivalent models. (See e.g. UCLA: Statistical Consulting Group, R Library: Contrast Coding Systems for categorical variables for some commonly used schemes.) So if someone says the proportion of happy people is high just because a lot are blue & red, you have to ask what frequencies of blue & red they're contrasting the observed frequencies with, & why.

When you come to compare the happiness of different groups, including a dummy variable for "group" in the model does allow you to talk about something useful: the coefficient for that variable describes a difference between the groups that isn't attributable to their being a different mix of colours.

† Or if they don't have to, then you simply haven't measured the colourless "baseline happiness" when such people aren't in your sample..

  • $\begingroup$ Right, I am aware of the problem you raise initially (there's always some color present). Could you say more about how to include a dummy variable for "group" in the model? That is, what values should go into that variable? $\endgroup$ – Sverre Mar 14 '15 at 16:58
  • $\begingroup$ '0' for membership of one group; '1' for membership of the other is common - but any two distinct values will do. That you need to ask suggests some study of regression would be a good idea, e.g. reading Faraway (2002), Practical Regression & ANOVA using R, Ch.15 in particular. $\endgroup$ – Scortchi - Reinstate Monica Mar 14 '15 at 17:56
  • $\begingroup$ Oh, now I see what you meant - I misunderstood what you meant by 'dummy variable'. As I pointed out in my original question, I actually don't have any data at all about any other group than the one I am testing. So I'm not able to add any information about whether a data point belongs to group A or B. $\endgroup$ – Sverre Mar 14 '15 at 20:15
  • $\begingroup$ Oh good! Is your question answered? Or is something still unclear? $\endgroup$ – Scortchi - Reinstate Monica Mar 14 '15 at 20:19
  • $\begingroup$ I think the answer to my general question is "no, it cannot be done". Which was my suspicion anyway. But there's clearly something about the way I am asking this which people don't understand (hence the question is closed), so I think I'll just give this up for the moment. $\endgroup$ – Sverre Mar 14 '15 at 20:24

Not the answer you're looking for? Browse other questions tagged or ask your own question.