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.
OJA data frame with 1070 observations on the following 18 variables.
PurchaseA factor with levels CH and MM
indicating whether the customer purchased Citrus Hill or Minute
Maid Orange Juice
% \item{\code{HouseholdID}}{Household ID}
WeekofPurchaseWeek of purchase
StoreIDStore ID
% \item{\code{Buy}}{0/1 dummy variable where 1 corresponds to CH purchase}
PriceCHPrice charged for CH
PriceMMPrice charged for MM
DiscCHDiscount offered for CH
DiscMMDiscount offered for MM
SpecialCHIndicator of special on CH
SpecialMMIndicator of special on MM
LoyalCHCustomer brand loyalty for CH
% \item{\code{LoyalMM}}{Customer brand loyalty for MM}
SalePriceMMSale price for MM
SalePriceCHSale price for CH
PriceDiffSale price of MM less sale price of CH
Store7A factor with levels No and Yes
indicating whether the sale is at Store 7
PctDiscMMPercentage discount for MM
PctDiscCHPercentage discount for CH
ListPriceDiffList price of MM less list price of CH
STOREWhich of 5 possible stores the sale occured at
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
summary(OJ)
plot(OJ$Purchase,OJ$PriceCH)
Run the code above in your browser using DataLab