# How to isolate the effect of dichotomous predictor?

I want to isolate gender differences in preferences for a particular attribute of a product based on data available about their product purchases. I understand that I have to use a mixed Poisson regression model as in my data - (1) I have same person buying multiple products (also, a given product might be bought by several people); and (2) the product attribute I am interested is a count variable. I am using the below model in R -

glmer(p1 ~ gender + (1|personID), family=poisson)


In this model, how should I control for the effects of other product attributes (e.g., price)? In essence, I want to say something to the effect of "women prefer products that are high on p1 more than do men, even after controlling for price of the products"? Would the below modification to the model take care of all other product attributes?

glmer(p1 ~ gender + (1|personID) + (1|product), family=poisson)


That being said, I wonder if you are approaching your modeling in an appropriate way? What is $$p_1$$ here? Is $$p_1$$ a count variable? Poisson models are usually reserved for modeling count data (i.e. when your response is a count, not your independent variables) -- this is the reason you were probably told to use a Poisson model -- not because of the first reason you listed in your post: "I have same person buying multiple products (also, a given product might be bought by several people)." When you have multiple purchases by the same person, this usually indicates that here is a correlated data problem, which means you'll likely have to rely on other methods than a standard Poisson model. This is likely why someone recommended you use a mixed model. That being said, given that you are interested in overall/population gender effects, and you have correlated data, I'd recommend the use of Generalized Estimating Equations or a Quasi-Poisson model. Mixed models are generally needed for estimating individual level effects (e.g. if you were interested in looking at a specific person's purchase behavior), but in this case, you seem interested only in population-level estimates to predict general preferences among demographic blocks.
• Thank you very much. I will explore GEE and Quasi-Poisson. But I still don't exactly get what is incorrect with the current glmer Poisson model specification. Could I not simply look at the coefficient of gender in the mixed model and its significance to make inferences about gender differences? Please let me know. A second concern that remains is, with respect to adding price as co-variate/control variable. Does it not imply that I am trying to say that price predicts p1? How do I say that it is not on price, but p1 that gender differences exist? – Bensun Feb 12 '19 at 5:48
• I'm not sure I'd say it's "incorrect," but I'd say, that GEE sounds better suited for your needs. There is a very popular post on CV about the difference between GEE and Random effects models that should help you understand why I recommend GEE (see here stats.stackexchange.com/questions/16390/…). By adding price as a covariate to the RHS of the equal sign in your model statement, you are controlling for it in the context you've presented. But you still haven't told us how $p_1$ is measured so we're unsure about Poisson. – StatsStudent Feb 12 '19 at 15:25
• Super helpful GEE link! Thanks a lot also for the clarification on adding price as covariate. One additional question - how would I interpret if I get the coefficient of price as significant? BTW, the dependent variable is a measure of social buzz a product attracts. It is operationalized as number of tweets the product receives. – Bensun Feb 12 '19 at 18:27
• Got it. That's helpful. So $p_1$ sounds like it probably is appropriate since larger numbers of $p_1$ are probably "rare events." I would almost expect price to be a significant predictor of social buzz: I can imagine a really good deal on a consumer item might tend to generate more buzz, so in this case, the price would not only be associated with social buzz, but it would cause it. In fact, you are controlling for price precisely because you expect it to have an impact on price (some advocate leaving out variables that are not significant). – StatsStudent Feb 12 '19 at 18:36
• So in this sense, you are almost hoping that price is significant. By including it in the model, you have accounted for the variability due to to price, so now you can examine the difference in gender (change the value from 0 to 1 for for example) while holding price at some constant value (perhaps the mean or some value of interest). – StatsStudent Feb 12 '19 at 18:37