2
$\begingroup$

I have a dataset that contains 3 variables:

  1. A categorical variable in form of names (categories)
  2. Two numerical variables with a metric scale level (stars and review_count)

My goal is to find out which categorical variable I should choose to maximise the two numerical variables.

yelp_asian_final %>%
select(categories, review_count, stars) %>% head(5)

                              categories review_count stars
1                            Chinese           16   3.0
2 c("Thai", "Vietnamese", "Chinese")          156   4.0
3                            Chinese           22   3.5
4                            Chinese           76   3.0
5          c("Korean", "Sushi Bars")           76   3.0

My Idea was to make a MANOVA like:

Y <- cbind(yelp_asian_final$review_count,yelp_asian_final$stars)
fit <- manova(Y ~ categories, data = yelp_asian_final)
summary.aov(fit)

 Response 1 :
              Df    Sum Sq Mean Sq F value    Pr(>F)    
categories   221  27856966  126050  4.7552 < 2.2e-16 ***
Residuals   4242 112446466   26508                      
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

 Response 2 :
              Df  Sum Sq Mean Sq F value    Pr(>F)    
categories   221  298.32 1.34987  3.4095 < 2.2e-16 ***
Residuals   4242 1679.44 0.39591                      
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

The problem is that I only get the information, that the category has an Influence on both variables but I got no answer which category I should choose to maximize both, the stars and the review_counts. It would be great to get an advice.

$\endgroup$
3
  • $\begingroup$ How correlated are review_count and stars in your data? $\endgroup$ Commented Jan 16, 2018 at 16:45
  • $\begingroup$ There is a correlation of 0.19 $\endgroup$
    – Banjo
    Commented Jan 16, 2018 at 17:54
  • 1
    $\begingroup$ Old question, but what you are doing here is formulating an optimization problem: "What is the best X / what maximizes Y" without choosing a 1-dimensional metric / score function. You have to choose a way to compute something like a "score" by combining reviews and rating. Then you can make claims about maximizing stars and review counts based on choice of category. $\endgroup$ Commented Sep 12, 2019 at 14:42

1 Answer 1

0
$\begingroup$

One option is to split your "categories" variables in several dichotomic variables. Then, the model will tell you which category have an impact, and if this impact is positive or negative.

$\endgroup$

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.