# How to interpret pairs plot in R?

I am a beginner in plotting/graphing. Kindly explain how to interpret the pairwise scatter plots generated using pairs() function in R. The data contains 323 columns of different indicators of a disease. Although I see that many columns are mean, std, slope, min, max and so on of any one parameter. For example, for an attribute like 'walking', there are other attributes like: sum.slope.walking, meansquares.slope.walking, sd.slope.walking and so on. Is it okay to select any one parameter in such a case (such as meansquares.slope..) ?

What are the patterns to look out for to identify relationships between attributes ?

If you have a number of different measurements in your data.frame, then pairs will show scatterplots of between all pairs of these measures.

Example data:

x <- rnorm(100)
obs <- data.frame(a = x,
b = rnorm(100),
c = x + runif(100, .5, 1),
d = jitter(x^2))

pairs(obs)


This is a data.frame with four different measures called a, b, c and d on 100 individuals. pairs draws this plot:

In the first line you see a scatter plot of a and b, then one of a and c and then one of a and d. In the second row b and a (symmetric to the first), b and c and b and d and so on.

pairs does not compute sums or mean squares or whatever. If you find that in your pairs plot, then that is in your dataframe.

What patterns to look for? In my example you find no pattern between a and b, a linear pattern between a and cand a curved, non-linear pattern between a and d. Look for patterns that might be of interest to your statistical questions.

Please note, that whilst asking for the interpretation of a plot is a statistical question, questions on how to use R alone are not on topic on Cross Validated. You should ask questions on R programming on Stack Overflow.

• thank you. i did not mean that the 'pairs' function computes sums/mean squares.i said that the data i am using has attributes like: max_a, min_a, mean_a, slope_a, sum_a (ie, attributes that depend on each other?).In such cases, am wondering which attributes to eliminate.Is it enough to consider mean of an attribute? and so on. Also, what are some properties inferred about the attributes from these patterns? are there any other patterns to look out for? – Mvkt Jun 26 '18 at 14:37
• > .Is it enough to consider mean of an attribute? -- Enough to achieve what? – Bernhard Jun 26 '18 at 19:34
• ok. enough to identify relationships between the variables from a pairwise plot in this case. – Mvkt Jun 28 '18 at 13:32
• Without knowing, what kind of attributes you investigate in order to achieve what goal, we cannot answer, which aspect auf the attributes you should investigate. If you want to detect malaria form intermittend fever, you are interested in the maximum body temperature within three or four days, not in the mean temperature... – Bernhard Jul 20 '18 at 22:23