MANE 6313
Week 2, Module F - Multivariate Data Creation and Analysis
Multivariate Data Creation
- Multivariate data sets contain more than one column
- R stores multivariate data in a Data Frame
- Demonstrate importing Microsoft Excel data into RStudio
Importing Excel Data
- Place Excel file in working directory

Importing Excel Data, continued
- From upper right pane, click on Import Dataset
- Select From Excel
Importing Excel Data, continued
- Note: in my installation I had to install an updated packdage for readxl
- Import Excel Screen appears

Importing Excel, continued
- Select the Excel spreadsheet

Importing Excel, continued
- Notice that the contents of the spreadsheet are displayed in the Data Preview pane
- The default name is sampleData (see import options)
- Click on Import to complete process

Importing Excel, continued
- Notice that a new tab appears next to the R Markdown tab (Untitled1)
- Notice in the upper right pane, that Sample Data has been added
Structure of a Data Frame
- To examine contents of a data frame, use the str() function

Accessing a Column
- Use the data frame name\(\$\)colunm name, e.g. sampleData\(\$\)y

Descriptive Statistics
- The techniques used for univariate apply to multivariate data
- New to this section is correlation analysis
Summary Function

Describe Function

Correlation
- Correlation can be found between pairs of variables or all variables
- Example demonstrates rounding correlation results to two decimal places for all pairs of data

Graphical Analysis
- As with descriptive statistics, the univariate graphical analysis techniques apply to multivariate data
- Introduce matrix of scatter plots
Box Plots

Matrix of Scatter Plots
