Data
The dataset UScereal in the MASS package gives eleven variables for a group of 65 breakfast cereals. The three variables that I am interested with are “calories”, “fat” and “sugars”.
Scatter Matrix
From above scatter matrix, clearly, there is a positive trend between “calories” and “fat”, so as “calories” and “sugars”. And, the relationship between “fat” and “sugars” seems to be slightly positive as well. Hence, it is reasonable to choose “calories” as the response variable.
Coplot
The above graphs “calories” against “fat” given “sugars”. By adding the loess curves, it is more clear that the patterns have roughly the same slope, which supports my previous claim of week association between “fat” and “sugar”. And when I go back to the scatter matrix, it seems observations that contain high grams of fat have high grams of sugar as well, which gives the reason of existing differences in length of the loess curves.
Generally, as the given grams of sugars in these cereals increase, the positive relationship between “calories” and “fat” becomes more clear.
Spinning 3-dimensional scatterplot
It is really cool and funny to play with the spinning 3-dimensional scatterplot. Actually, this method is really helpful and effective in identifying any outliers. As shown above, I have labeled the two “special” cereals that seem to deviate from the general relationship patterns: “Great Grams Pecan” and “Grape Nuts”.