10.07.2015 Views

Using R for Introductory Statistics : John Verzani

Using R for Introductory Statistics : John Verzani

Using R for Introductory Statistics : John Verzani

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 4Multivariate DataMultivariate data can be summarized and viewed in ways that are similar to thosediscussed <strong>for</strong> bivariate and univariate data, although differences exist, as there are manymore possible relationships. These differences can be handled by looking at all thevariables simultaneously, or by holding some variables constant while we look at others.The tools used are similar to those <strong>for</strong> bivariate data, though if we enhance our datamanipulationskills the work will be easier. This chapter includes more details on R’sdata frames, lists, and model <strong>for</strong>mula notation. Also included is an introduction to R’slattice graphics package, which greatly enhances certain explorations of multivariate data.4.1 Viewing multivariate dataIn this chapter we look at three typical examples of multivariate data. The firstsummarizes survey results (categorical data), the second compares independent samples;and the third searches <strong>for</strong> relationships among many different variables.4.1.1 Summarizing categorical dataJust as we used tables to summarize bivariate data, we use them <strong>for</strong> multivariate data aswell. However, as a table shows only two relationships at once, we will need to useseveral when looking at three or more relationships.■ Example 4.1: Student expenses The student. expenses (<strong>Using</strong>R) data set containsthe results of a simple survey. Students were asked which of five different expenses theyincur. The data is in Table 4.1.Even a small table like this contains too much in<strong>for</strong>mation <strong>for</strong> us to identifyTable 4.1 Student expenses surveyStudent cell.phone cable, tv dial.up cable.modem car1 Y Y Y N Y2 Y N N N N3 N N N N Y4 Y Y N Y Y5 N N N N N6 Y N Y N Y7 Y N N Y N8 N N N N Y9 Y Y N N Y

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!