Skip to content

Commit 52af29a

Browse files
committed
began analyzing Bivariate plots of wine data set.
1 parent d3de313 commit 52af29a

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

red-wine.Rmd

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ library(ggplot2)
1414
library(cowplot)
1515
library(GGally)
1616
library(corrplot)
17+
library(psych)
1718
```
1819

1920
# Univariate Plots Section
@@ -214,7 +215,7 @@ It looks like most wines have sulphate between 0.5 and 0.9.
214215
### What is the structure of your dataset?
215216
There are 1,599 diamonds in the dataset with 12 features (fixed acidity, volatile acidity, citric acid, residual sugar, chlorides, free sulfur dioxide, total sulfur dioxide, density, pH, sulphates, alcohol, and quality). The "quality" variable can be represented as a factor variable.
216217

217-
(worst) —————-> (best)
218+
(worst) ???????????????-> (best)
218219

219220
**Quality**: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
220221

@@ -241,3 +242,19 @@ Not necessarily. The only consideration is to make quality variable to be a fact
241242
For the variable, "alcohol", I zoomed the distribution in a bit. I found that alcohol is not a continuous variable. 2nd decimal point is rarely appeared whereas the alcohol value jumps by the 1st decimal point.
242243

243244
# Bivariate Plots Section
245+
```{r echo=FALSE}
246+
rwd_cor <- round(cor(rwd), 3)
247+
```
248+
249+
The most correlated variable's coefficiency is 0.476, and that is alcohol. Therefore, there aren't a variable strongly correlated to the quality by looking at the coefficiency chart above. There are variables showing somewhat weekly related, but most of variables seem not correlated. I think I should look into each of those in more detail.
250+
251+
```{r fig.align='center', echo=FALSE}
252+
corrplot.mixed(rwd_cor, upper = 'square', lower = 'number')
253+
pairs.panels(rwd,
254+
method = "pearson", # correlation method
255+
hist.col = "#00AFBB",
256+
density = TRUE, # show density plots
257+
ellipses = TRUE # show correlation ellipses
258+
)
259+
```
260+

0 commit comments

Comments
 (0)