Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please provide R coding Exploratory Data Analysis: This exercise relates to the household income and expense dataset ayailable on Blackboard as Inc Exp.Data.csv. The data

please provide R coding image text in transcribed
Exploratory Data Analysis: This exercise relates to the household income and expense dataset ayailable on Blackboard as "Inc Exp.Data.csv". The data was taken from Kaggle and has 7 variables related to the income and expense details of households The following table defines the variables in the data: Load the dataset into R and answer the following questions: (a) How many rows and columns are in the dataset? (b) Convert the variable "Highest_Qualified Member" to a factor variable. Print the summary of dataset and explain the key points of the summary for "Mthly _HH Income" and "Highest.Qualified Member"" (c) Calculate the mean and standard deviation of all numeric columns. Hint: Use dplyr package to filter only numeric columns using the is numeric filter and then generate summary statistics. (d) Calculate disposable income of households as the difference between monthly income and expenses. Plot a histogram of disposable income with 10 breaks. Hint: Use the hist function and look at the help file for the "breaks" argument (e) Construct a boxplot for monthly household income against the highest qualified member in a household. Your boxplots should be in the sequence illiterate, undergraduate, professional, graduate, post-graduate. Hint: You may need to redefine the levels of the factor variable "Highest_Qualified_Member". Use the levels argument in the factor command. Use the boxplot function. You should get 5 box plots in the same chart. (f) For families with no more than 4 family members, calculate average monthly household income by highest qualified member using dplyr. Then. create a bar chart using ggplot2 demonstrating the same information. Hint: Use chaining for dplyr filter, group_by and summarize and pass it to the ggplot function. Exploratory Data Analysis: This exercise relates to the household income and expense dataset ayailable on Blackboard as "Inc Exp.Data.csv". The data was taken from Kaggle and has 7 variables related to the income and expense details of households The following table defines the variables in the data: Load the dataset into R and answer the following questions: (a) How many rows and columns are in the dataset? (b) Convert the variable "Highest_Qualified Member" to a factor variable. Print the summary of dataset and explain the key points of the summary for "Mthly _HH Income" and "Highest.Qualified Member"" (c) Calculate the mean and standard deviation of all numeric columns. Hint: Use dplyr package to filter only numeric columns using the is numeric filter and then generate summary statistics. (d) Calculate disposable income of households as the difference between monthly income and expenses. Plot a histogram of disposable income with 10 breaks. Hint: Use the hist function and look at the help file for the "breaks" argument (e) Construct a boxplot for monthly household income against the highest qualified member in a household. Your boxplots should be in the sequence illiterate, undergraduate, professional, graduate, post-graduate. Hint: You may need to redefine the levels of the factor variable "Highest_Qualified_Member". Use the levels argument in the factor command. Use the boxplot function. You should get 5 box plots in the same chart. (f) For families with no more than 4 family members, calculate average monthly household income by highest qualified member using dplyr. Then. create a bar chart using ggplot2 demonstrating the same information. Hint: Use chaining for dplyr filter, group_by and summarize and pass it to the ggplot function

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Port Infrastructure Finance

Authors: Hilde Meersman, Eddy Van De Voorde, Thierry Vanelslander

1st Edition

0415720060, 978-0415720069

More Books

Students also viewed these Finance questions

Question

c. What were you expected to do when you grew up?

Answered: 1 week ago

Question

4. Describe how cultural values influence communication.

Answered: 1 week ago

Question

3. Identify and describe nine cultural value orientations.

Answered: 1 week ago