5
$\begingroup$

I have a dataset with customer reviews of products and product features. Each customer reviews multiple products, but customers don't necessarily review the same products. The products are similar, they share the same features. I need to prove that different customers value product features differently.

I fit a mixed model with a random intercept and a random slope for each customer to the data in R using lmer.

model1 = lmer('review ~ (1 + feature1 + feature2 |customer) + feature1 + feature2')

I'm unsure how to test if they value the product features. I read I should test if the variance for the feature coefficients is significantly different from 0, but I don't know how to do that.

I also fit a model with only a random intercept.

model2 = lmer('review ~ (1 |customer) + feature1 + feature2')

And I ran the anova test:

anova(model2, model1)

and got the following output:

Models:
model1: review ~ (1 | customer) + feature1 + feature2
model2: review ~ (1 + feature1 + feature2 | customer) + feature1 + feature2
       npar   AIC   BIC  logLik deviance Chisq Df Pr(>Chisq)
model1    5 13594 13626 -6791.7    13584                    
model2   10 13599 13663 -6789.3    13579 4.866  5     0.4325

Since the p-value is very high, does this prove customers don't value product features differently? If I had gotten a small p, would that mean they do value them differently?

Is this a valid way to test my claim or is there other ways I can test this?

$\endgroup$
2
  • $\begingroup$ What are the features? How are they measured? How many products did each person review? $\endgroup$
    – Peter Flom
    Commented Aug 23, 2023 at 17:45
  • $\begingroup$ @PeterFlom the products are cellphones from different brands, the features are their technical specifications and their price, the number of reviews per customer varies. $\endgroup$
    – Melanie
    Commented Aug 23, 2023 at 18:05

1 Answer 1

6
$\begingroup$

What this implies is that the effect of the two features on the review does not vary between customers (their effect on the review, whatever it is--you need to look at the fixed effects--is the same across customers)

To see the fixed effects, take a look at summary(model2) (or you could opt to retain model 1 with random intercepts but fixed slopes, seeing as there is no significant variation in slopes when tested together)

$\endgroup$
2
  • $\begingroup$ Your first sentence seems to me to answer the OP's question, with a "Yes, they don't vary" but then the next bit says "you need to look at fixed effects". I'm confused as to what you are saying. Maybe it needs editing? $\endgroup$
    – Peter Flom
    Commented Aug 23, 2023 at 17:48
  • 1
    $\begingroup$ I'm not sure where the confusion comes from. OP shows a test of random effects, but she sounds interested in fixed effects. You can get any combination of significant or non significant fixed effects with any combination of significant or non significant random effects. Fixed effects test whether average effects are 0 (here, across customers), random effects test whether these effects (regardless of whether they are 0 or not on average) vary across customers. She tested the variance of the effects (random effects), she's interested in the means of the effects (fixed effects). $\endgroup$ Commented Aug 23, 2023 at 17:55

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.