OpenIntro Example: Scatterplot of Federal Spending Versus Poverty Rate

In the Open Intro Textbook Advanced High School Statistics, a scatterplot is created with the county dataset with poverty as the independent variable and fed_spend as the dependent variable. How does one recreate this plot in Quadstat, R and SAS?

To recreate this plot, use the Bivariate Plot web application. We will want to select county from the dropdown select as shown here.

Bivariate Plot Statistics Quadstat Screenshot

We will also need to select two columns. Use the mouse to highlight a column header. The first column chosen will be the independent variable. Once a column is highlighted, it will appear with a shaded background.

Quadstat Statistics Highlighted Column Screenshot

Once both columns are select, click "Submit". The browser will be redirected to a < a href="">page with the bivariate scatterplot (the same shown on page 14 of the OpenIntro Textbook Advanced High School Statistics.)

Quadstat Statistics Bivariate Scatterplot Screenshot
R Code
X <- read.table("/home/ubuntu/county.txt", sep="\t", header = TRUE); plot(X)
SAS Code
/* Generated Code (IMPORT) */
/* Source File: county.txt */
/* Source Path: /folders/myshortcuts/Quadstat */
/* Code generated on: 5/29/17, 11:17 AM */
FILENAME COUNTY '/folders/myshortcuts/Quadstat/county.txt';

The statistician will want to make sure place county.txt file in the SAS VirtualBox folder created and also rename the path to county.txt.

This line in the code above is to set the delimiter as the TAB character which in SAS is represented as '09'x.


From Around the Site...

Title Authored on Content type
R Dataset / Package Stat2Data / ICU March 9, 2018 - 1:06 PM Dataset
R Dataset / Package robustbase / starsCYG March 9, 2018 - 1:06 PM Dataset
R Dataset / Package Stat2Data / Putts2 March 9, 2018 - 1:06 PM Dataset
R Dataset / Package gap / l51 March 9, 2018 - 1:06 PM Dataset
R Dataset / Package DAAG / elasticband March 9, 2018 - 1:06 PM Dataset