R Dataset / Package ISLR / Carseats
On this R-data statistics page, you will find information about the Carseats data set which pertains to Sales of Child Car Seats. The Carseats data set is found in the ISLR R package. You can load the Carseats data set in R by issuing the following command at the console data("Carseats"). This will load the data into a variable called Carseats. If R says the Carseats data set is not found, you can try installing the package by issuing this command install.packages("ISLR") and then attempt to reload the data with the library() command. If you need to download R, you can go to the R project website. You can download a CSV (comma separated values) version of the Carseats R data set. The size of this file is about 19,044 bytes.
Sales of Child Car Seats
Description
A simulated data set containing sales of child car seats at 400 different stores.
Usage
Carseats
Format
A data frame with 400 observations on the following 11 variables.
Sales
-
Unit sales (in thousands) at each location
CompPrice
-
Price charged by competitor at each location
Income
-
Community income level (in thousands of dollars)
Advertising
-
Local advertising budget for company at each location (in thousands of dollars)
Population
-
Population size in region (in thousands)
Price
-
Price company charges for car seats at each site
ShelveLoc
-
A factor with levels
Bad
,Good
andMedium
indicating the quality of the shelving location for the car seats at each site Age
-
Average age of the local population
Education
-
Education level at each location
Urban
-
A factor with levels
No
andYes
to indicate whether the store is in an urban or rural location US
-
A factor with levels
No
andYes
to indicate whether the store is in the US or not
Source
Simulated data
References
Games, G., Witten, D., Hastie, T., and Tibshirani, R. (2013) An Introduction to Statistical Learning with applications in R, www.StatLearning.com, Springer-Verlag, New York
Examples
summary(Carseats) lm.fit=lm(Sales~Advertising+Price,data=Carseats)
Dataset imported from https://www.r-project.org.