Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Regression Analysis with R

You're reading from  Regression Analysis with R

Product type Book
Published in Jan 2018
Publisher Packt
ISBN-13 9781788627306
Pages 422 pages
Edition 1st Edition
Languages
Author (1):
Giuseppe Ciaburro Giuseppe Ciaburro
Profile icon Giuseppe Ciaburro
Toc

Table of Contents (15) Chapters close

Title Page
Packt Upsell
Contributors
Preface
1. Getting Started with Regression 2. Basic Concepts – Simple Linear Regression 3. More Than Just One Predictor – MLR 4. When the Response Falls into Two Categories – Logistic Regression 5. Data Preparation Using R Tools 6. Avoiding Overfitting Problems - Achieving Generalization 7. Going Further with Regression Models 8. Beyond Linearity – When Curving Is Much Better 9. Regression Analysis in Practice 1. Other Books You May Enjoy Index

Association between variables – covariance and correlation


In the previous chapter, we introduced correlation concepts, and it is now necessary to deepen these concepts. This will help us understand how to use this information in advance and find possible relationships between variables. Let's start with a real example: a company at the launch of a new printer model wants to analyze sales at a number of stores to determine the best price. The following table shows the sales of the product in the last month and the sale price for these stores:

Store

SoldItems

Price

Store

SoldItems

Price

Store1

100

60

Store11

145

42

Store2

150

43

Store12

125

47

Store3

130

48

Store13

135

44

Store4

140

45

Store14

105

54

Store5

110

55

Store15

155

39

Store6

160

40

Store16

110

52

Store7

115

53

Store17

130

46

Store8

135

47

Store18

115

51

Store9

120

52

Store19

150

41

Store10

155

42

Store20

159

41

 

So far, we have only introduced the basic concepts without elaborating on them practically. It is now time to process the data in the R environment. The first thing to do is load the data...

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}