Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
R for Data Science Cookbook (n)

You're reading from  R for Data Science Cookbook (n)

Product type Book
Published in Jul 2016
Publisher
ISBN-13 9781784390815
Pages 452 pages
Edition 1st Edition
Languages
Author (1):
Yu-Wei, Chiu (David Chiu) Yu-Wei, Chiu (David Chiu)
Profile icon Yu-Wei, Chiu (David Chiu)

Table of Contents (19) Chapters

R for Data Science Cookbook
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
1. Functions in R 2. Data Extracting, Transforming, and Loading 3. Data Preprocessing and Preparation 4. Data Manipulation 5. Visualizing Data with ggplot2 6. Making Interactive Reports 7. Simulation from Probability Distributions 8. Statistical Inference in R 9. Rule and Pattern Mining with R 10. Time Series Mining with R 11. Supervised Machine Learning 12. Unsupervised Machine Learning Index

Conducting one-way ANOVA


Analysis of variance (ANOVA) investigates the relationship between categorical independent variables and continuous dependent variables. You can use it to test whether the means of several groups are equal. If there is only one categorical variable as an independent variable, you can perform a one-way ANOVA. On the other hand, if there are more than two categorical variables, you should perform a two-way ANOVA. In this recipe, we discuss how to conduct one-way ANOVA with R.

Getting ready

In this recipe, we will use the oneway.test and TukeyHSD functions.

How to do it…

Perform the following steps to perform a one-way ANOVA:

  1. We begin by visualizing data with a boxplot:

    >data_scientist<- c(95694,82465,85001,74721,73923,94552,96723,90795,103834,120751,82634,55362,105086,79361,79679,105383,85728,71689,92719,87916)
    >software_eng<- c(78069,82623,73552,85732,75354,81981,91162,83222,74088,91785,89922,84580,80864,70465,94327,70796,104247,96391,75171,65682)
    >bi_eng...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}