9 de abr. de 2012

Correlation Matrix (Constituents)

It is important to understand as better as possible our sample set before to develop the regression. Continuing with the “Y” matrix (constituent’s matrix) we have to observe the correlation matrix.
In the R Graph Gallery, we can get the code to draw a nice Correlation Matrix Plot, with the X-Y plots and the Pearson correlation values, apart from some more details.
I used the demo sample set. If we use the NA values, this code does not give correlation values for the constituents with NA values. If we have “0” indeed NA, correlation values are nor well calculated because the “0” values, so until we can modify this code, I deleted the two samples with “0” values, so we calculate the Correlation Matrix with 64 samples.
It is obvious the high inverse correlation between DM (Dry Matter) and Moisture (Moisture = 100-DM).
This sample set is of fish meal and where the protein content is very important. The way to control the protein is to add or ash, that is the reason for the high negative correlation.
All the conclusions we can get for this plot are important to study latter the loadings, regression coefficients,….

1 comentario: