Reader small image

You're reading from  Hands-On Exploratory Data Analysis with R

Product typeBook
Published inMay 2019
Reading LevelIntermediate
PublisherPackt
ISBN-139781789804379
Edition1st Edition
Languages
Tools
Right arrow
Authors (2):
Radhika Datar
Radhika Datar
author image
Radhika Datar

Radhika Datar has more than 5 years' experience in software development and content writing. She is well versed in frameworks such as Python, PHP, and Java, and regularly provides training on them. She has been working with Educba and Eduonix as a training consultant since June 2016, while also working as a freelance academic writer in data science and data analytics. She obtained her master's degree from the Symbiosis Institute of Computer Studies and Research and her bachelor's degree from K. J. Somaiya College of Science and Commerce.
Read more about Radhika Datar

Harish Garg
Harish Garg
author image
Harish Garg

Harish Garg is a Principal Software Developer, author, and co-founder of a software development and training company, Bignumworks. Harish has more than 19 years of experience in a wide variety of technologies, including blockchain, data science and enterprise software. During this time, he has worked for companies such as McAfee, Intel, etc.
Read more about Harish Garg

View More author details
Right arrow

Multi-factor variance analysis

To understand the correlation between the variables, it is important to understand the interaction between all the variables within the dataset. Let's focus on multi-factor variance analysis of the data frame specified with the help of the following steps:

  1. Create an aggregate value of the data frame with respect to the mpg and displacement values mentioned as follows:
> d <- aggregate(mpg ~ displacement, data = Autompg, FUN = mean)

> d
displacement mpg

1 68.0 29.00000
2 70.0 20.23333
3 71.0 31.50000
4 72.0 35.00000
5 76.0 31.00000
6 78.0 32.80000
7 79.0 32.18333
8 80.0 21.50000
9 81.0 35.10000
10 83.0 32.00000
>
print(abs(d[[2]][1]-d[[2]][2]))

[1] 8.7666
67
  1. Now, let's build a...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Hands-On Exploratory Data Analysis with R
Published in: May 2019Publisher: PacktISBN-13: 9781789804379

Authors (2)

author image
Radhika Datar

Radhika Datar has more than 5 years' experience in software development and content writing. She is well versed in frameworks such as Python, PHP, and Java, and regularly provides training on them. She has been working with Educba and Eduonix as a training consultant since June 2016, while also working as a freelance academic writer in data science and data analytics. She obtained her master's degree from the Symbiosis Institute of Computer Studies and Research and her bachelor's degree from K. J. Somaiya College of Science and Commerce.
Read more about Radhika Datar

author image
Harish Garg

Harish Garg is a Principal Software Developer, author, and co-founder of a software development and training company, Bignumworks. Harish has more than 19 years of experience in a wide variety of technologies, including blockchain, data science and enterprise software. During this time, he has worked for companies such as McAfee, Intel, etc.
Read more about Harish Garg