# How to plot scatter plot matrix of all the variable in the data set?

#1

I have a data set in which there is 14 independent and 1 dependent variable and all are numeric variable .I want to plot all the scatter plot at the same time in a single plot .I do not want to plot all scatter plots between each variable as individual .I want to know how this can be performed in R.

Thanks

#2

Hi @harry

Well as we can see in maximum three dimensions you have to do a dimension reduction of your 14 variables, which method? PCA will come to my mind as the data are not sparse (if spare one other method could be good) , and you use the 2 principal components (x,y) , before to do this verify that you explain enough of the variance and then your dependant in Z. You can do a t-sne as well (gaussian kernel type) with 2 dimension and then the third dimension is your dependant.
Now how will you explain your graph to whom you present ?? You will start to explain that in case of PCA you talk about the principal components, which are built based on the maximum variance (less deformation in the cloud of points) !!! Sorry if you present this to a manager you will have one issue and will be kicked out

Instead of taking your 14 variables, why not to take one with the maximum importance and to build a graph with those one only? Now you have to find the variables of importance and this based on your model. Do you have a linear relation, great this is easier non linear oh oh more difficult, there you should spend mot time.

Third solution heat map but this mean your dependant variable is a category or you build categories out of it, if you can do this then it could be the easiest way to present.

In few words presentation of higher dimension is always more difficult.

Hope this help

Alain

#3

It looks like you are looking for a plot similar to this: Run the following R code and see the plot.

`library(MASS) data(Boston) plot(Boston)`

#4

Hi @harry

sorry I red your mail too quickly, i understood you wanted one plot !!! Anyway check the link I entered below, you will have many example of graphics to display one view one response with multiple variables. Sorry I do not have the pdf of the book once paper version, but this is a good summary Graphic

Hope this help.

Alain