官术网_书友最值得收藏!

Using matrix scatter plots for a quick overview

What happens if we want to visualize a lot of scatter plots in a single graph to quickly get a sense for the data? In that case, we need matrix scatter plots. We have various package options to create such matrix scatter plots (such as the car package). However, to keep things simple, we will use a built-in function instead of an external package.

By looking at the graph shown below, we can get a big-picture view of the interactions among variables. The purpose of this type of visualization is not to provide details, but to provide a general overview. To read this plot we need to look at any interesting scatter plot in the matrix, and move both horizontally and vertically until we find the name associated with its axis.

For example, if you look at the plot immediately to the right of NoQuals and simultaneously immediately on top of L4Quals_plus, what you're looking at is at the relation between those two variables (NoQuals in the y axis, L4Quals_plus in the x axis), and we find that it's an inverse relation; the higher the percentage of people in a ward with high levels of education, the lower the percentage of people with low levels of education. Another obvious relation is that the higher the education level (L4Quals_plus), the higher the occupation (HigherOccup).

Matrix scatter plot

Due to space restrictions, we were not able to show all variable relations, since the scatter plots would be too small to make sense of. However, we encourage the reader to add more variables to the matrix. There are some non-obvious relations. Finding them is left as an exercise for the reader:

desired_variables <- c(
    "AdultMeanAge",
    "White",
    "Owned",
    "NoQuals",
    "L4Quals_plus",
    "Unemp",
    "HigherOccup",
    "Deprived",
    "Proportion"
)
pairs(data[, desired_variables])
主站蜘蛛池模板: 平昌县| 四川省| 临泽县| 师宗县| 维西| 横山县| 邻水| 舒城县| 林甸县| 苏尼特右旗| 克东县| 图木舒克市| 安龙县| 安顺市| 武汉市| 义马市| 双辽市| 曲周县| 潢川县| 新津县| 武乡县| 海丰县| 襄汾县| 峡江县| 乡城县| 吴旗县| 瑞金市| 赤水市| 德格县| 洛扎县| 蓝田县| 方正县| 临朐县| 惠州市| 宝丰县| 邹城市| 汤阴县| 漾濞| 玉田县| 阿拉善左旗| 扬中市|