A simulated data set containing sales of child car seats at 400 different stores.

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 and Medium 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 and Yes to indicate whether the store is in an urban or rural location

US

A factor with levels No and Yes to indicate whether the store is in the US or not

Source

Simulated data

References

James, 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)
#> Sales CompPrice Income Advertising #> Min. : 0.000 Min. : 77 Min. : 21.00 Min. : 0.000 #> 1st Qu.: 5.390 1st Qu.:115 1st Qu.: 42.75 1st Qu.: 0.000 #> Median : 7.490 Median :125 Median : 69.00 Median : 5.000 #> Mean : 7.496 Mean :125 Mean : 68.66 Mean : 6.635 #> 3rd Qu.: 9.320 3rd Qu.:135 3rd Qu.: 91.00 3rd Qu.:12.000 #> Max. :16.270 Max. :175 Max. :120.00 Max. :29.000 #> Population Price ShelveLoc Age Education #> Min. : 10.0 Min. : 24.0 Bad : 96 Min. :25.00 Min. :10.0 #> 1st Qu.:139.0 1st Qu.:100.0 Good : 85 1st Qu.:39.75 1st Qu.:12.0 #> Median :272.0 Median :117.0 Medium:219 Median :54.50 Median :14.0 #> Mean :264.8 Mean :115.8 Mean :53.32 Mean :13.9 #> 3rd Qu.:398.5 3rd Qu.:131.0 3rd Qu.:66.00 3rd Qu.:16.0 #> Max. :509.0 Max. :191.0 Max. :80.00 Max. :18.0 #> Urban US #> No :118 No :142 #> Yes:282 Yes:258 #> #> #> #>
lm.fit=lm(Sales~Advertising+Price,data=Carseats)