1
$\begingroup$

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)
$\endgroup$
0

1 Answer 1

2
$\begingroup$

Variables that you want to control for are usually added as independent variables to your model (so you'd simply add price to the RHS of the equal sign in your model statement).

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.

What I would recommend you do is build a GEE model and include as many different attributes as you want to control for on the product as covariates in your model as well as your repeated subject ID and gender indicator variable. Then you'll be able to say for example what the expected effect on your response is when you go from males to femals (or vice-versa) when controlling for the given attributes. You should consider including interaction terms if you think certain attributes have a differential effect on your outcome variable for males and females. This will also allow you to assess the impact of the attributes on preferences.

$\endgroup$
5
  • $\begingroup$ 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? $\endgroup$
    – SanMelkote
    Commented Feb 12, 2019 at 5:48
  • 1
    $\begingroup$ 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. $\endgroup$ Commented Feb 12, 2019 at 15:25
  • $\begingroup$ 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. $\endgroup$
    – SanMelkote
    Commented Feb 12, 2019 at 18:27
  • 1
    $\begingroup$ 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). $\endgroup$ Commented Feb 12, 2019 at 18:36
  • 1
    $\begingroup$ 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). $\endgroup$ Commented Feb 12, 2019 at 18:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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