I am working with the diamonds data set from the tidyverse package in R.
library(tidyverse)
View(diamonds)
When I plot a histogram of the price variable with 300 bins there looks to be 3 groups.
When I take the log of price these groups become much more vivid. There might even be 4 groups instead of 3!
My question is, how do I make sure there are groups here? What are these groups? Lastly, if I do not have the data on what these groups actually are, let's say for our case the groups are continent from which the diamond was found.
Once I distinguish the groups (maybe through GMM) how do I incorporate it in a regression model, where I regress prices on carat?
Thank you kindly.
Edit** I am editing this comment due to Henry's comment. It's more of friendly rebuttal to the comment - try to explain the DV with features in the data set before trying to group the DV.
If we take a look at the iris data set (not knowing there are three different flowers) and regress Petal Width ~ Sepal Width we would conclude that Sepal Width is not a good predictor.
However, if we originally run our GMM on the Petal Width we get back 3 groups and can visually see that Sepal Width is a good predictor.