Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using R https://www.dropbox.com/scl/fo/rjlc5f1dysjepazcms62h/h?dl=0&rlkey=tvvc8og88rz5vkr46udnqv4oh Question 1: How many households are there in the full data set? Question 2:How many variables are there? Question 3:There is no

Using R

https://www.dropbox.com/scl/fo/rjlc5f1dysjepazcms62h/h?dl=0&rlkey=tvvc8og88rz5vkr46udnqv4oh

Question 1: How many households are there in the full data set?

Question 2:How many variables are there?

Question 3:There is no reason to carry this many variables around so subset the data so that you only keep the variables between "hhid" and "shstruc".

How many variables are you left with now?

If you have not previously committed the R script you should do it now. You should have at least two commits with good commit messages by the time you are done with this assignment.

Question 4:

Plot the distribution of the number of listed household members for the entire sample and upload here.

Note 1: there are (at least) two different ways to do this using "ggplot." If you use a histogram, make sure you pick a "binwidth" that makes sense for this variable.

Note 2: there is a way to save plots directly in the script, but for this time simply export the plot from RStudio.

Make a new data frame that contains only urban households (the variable is "hv025").

Question 5:Produce a boxplot plot using the data frame you just created that shows the distribution of household size by type of urban area. You will need to use factor to get R to understand that the type of urban area is a categorical variable.

Label the variables and types of urban areas. The latter might take some Googling.

Question 6:Use "group_by" and "summarise" to find the means and medians of the number of household members by type of urban area. Match the correct means to their urban areas: Large City, Small City, Town

Question 7: What does the relationship between the mean and median tell you about the distribution of household size?

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

Managerial accounting

Authors: ramji balakrishnan, k. s i varamakrishnan, Geoffrey b. sprin

1st edition

471467855, 978-0471467854

Students also viewed these Mathematics questions