Skip to Main Content
SAS for R Users
book

SAS for R Users

by Ajay Ohri
September 2019
Beginner to intermediate content levelBeginner to intermediate
208 pages
3h 17m
English
Wiley
Content preview from SAS for R Users

9Data Visualization

Data Visualization is an important part of the data science process. Here we learn how to do data science in both languages.

9.1 Importance of Data Visualization

The anscombe dataset shows the importance of data visualization. On statistical examination it shows data is similar. But on visualization it shows the data is very different.

Property Value
Mean of x 9
Sample variance of x 11
Mean of y 7.50
Sample variance of y 4.125
Correlation between x and y 0.816
Linear regression line y = 3.00 + 0.500x
Coefficient of determination of the linear regression 0.67

But the graphs are quite different.

Anscombe dataset in R consists of 4 graphs for y1 vs x1 (top left), y2 vs. x2 (top right), y3 vs. x3 (bottom left), and y4 vs. x4 (bottom right) displaying circle markers with various patterns.

Figure 9.1 Anscombe Dataset in R.

We are going to do the following graphs in this chapter for both SAS and R:

  • Bar Plot: A bar chart represents data in vertical bars with height of the bar proportional to the value of the variable.
  • Bar‐Line Plot: A combination of Bar Plots with Line Graphs, with one quantity being represented in a Bar Plot and the other in a Line Graph.
  • Box Plot: A plot in which a rectangle is drawn to represent the second and third quartiles, usually with a vertical line inside to indicate ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Statistical Hypothesis Testing with SAS and R

Statistical Hypothesis Testing with SAS and R

Sonja Kuhnt, Dirk Taeger

Publisher Resources

ISBN: 9781119256410Purchase book