Learn R Programming

ISLR (version 1.4)

OJ: Orange Juice Data

Description

The data contains 1070 purchases where the customer either purchased Citrus Hill or Minute Maid Orange Juice. A number of characteristics of the customer and product are recorded.

Usage

OJ

Arguments

Format

A data frame with 1070 observations on the following 18 variables.

Purchase

A factor with levels CH and MM indicating whether the customer purchased Citrus Hill or Minute Maid Orange Juice

% \item{\code{HouseholdID}}{Household ID}
WeekofPurchase

Week of purchase

StoreID

Store ID

% \item{\code{Buy}}{0/1 dummy variable where 1 corresponds to CH purchase}
PriceCH

Price charged for CH

PriceMM

Price charged for MM

DiscCH

Discount offered for CH

DiscMM

Discount offered for MM

SpecialCH

Indicator of special on CH

SpecialMM

Indicator of special on MM

LoyalCH

Customer brand loyalty for CH

% \item{\code{LoyalMM}}{Customer brand loyalty for MM}
SalePriceMM

Sale price for MM

SalePriceCH

Sale price for CH

PriceDiff

Sale price of MM less sale price of CH

Store7

A factor with levels No and Yes indicating whether the sale is at Store 7

PctDiscMM

Percentage discount for MM

PctDiscCH

Percentage discount for CH

ListPriceDiff

List price of MM less list price of CH

STORE

Which of 5 possible stores the sale occured at

References

James, G., Witten, D., Hastie, T., and Tibshirani, R. (2013) An Introduction to Statistical Learning with applications in R, https://www.statlearning.com, Springer-Verlag, New York

Examples

Run this code
# NOT RUN {
summary(OJ)
plot(OJ$Purchase,OJ$PriceCH)
# }

Run the code above in your browser using DataLab