Boxplot
The dataset you're about to use has been derived from the Quarterly Interview Survey of the Consumer Expenditure Survey (CES) by the U.S. Department of Labor, Bureau of Labor Statistics. It is available on the course page. The original data set comprises 869 households and 34 variables.
One feature is a unique ID, five characterize the size of the household, six contain other characteristics of the household like age, education ethnicity, etc. The rest of the variables represent the household expenditures. We focus on the variable thexp
, already extracted for you and available in the workspace, corresponding to total household expenditure.
So far, visualizations were provided. Now, you will build your own boxplot! The package robustbase
has been loaded for you.
This exercise is part of the course
Fraud Detection in R
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Create boxplot
bp.thexp <- ___(___, col = "lightblue", main = "Standard boxplot", ylab = "Total household expenditure")