Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Exercise 1 ( 5 0 points ) Create the following visualizations using R ( ggplot 2 ) and dataset ( acs _ ny . csv

Exercise 1(50 points)
Create the following visualizations using R(ggplot2) and dataset (acs_ny.csv), which is a subset of the
2010 American Community Survey (ACS) for the New York state.
a) Create a bar chart for income levels ( $50,000 or less, $50,001- $100,000,$100,001-$150,000,
and more than $150,000) and language spoken at home.
b) b) Create a visualization to show the relationship between familyIncome ( $50,000 or less,
$50,001- $100,000,$100,001- $150,000, and more than $150,000) and average HouseCost.
c) Create scatterplots using R to visualize relationship between the dependent variable
(FamilyIncome) and each independent variable.
d) Using the dataset, create a multiple regression model in R. The purpose of this model is to
predict the household income.
Create and compare at least four models.
Perform Stepwise regression to find an optimal set of predictors.
Explain your results including r squared and p-values.
Which model provides better accuracy? Why?
Does your model conform to the assumptions of linear regression?
Exercise 2(50 points)
Using the provided subset (acs_ny.csv) of the 2010 American Community Survey (ACS) for New York
state, create a logistic regression model in R. The purpose of this model is to predict whether a
household has an income greater than $150,000.
a) Explain your results including deviance residuals, coefficients, and AIC.
b) Create coefficient plot for logistic regression on family income greater than $150,000.
Hint: You will need to create a new binary variable with TRUE for income above $150,000 and FALSE for
income below. It will be helpful to create density plot of family income to see distribution.
image text in transcribed

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_2

Step: 3

blur-text-image_3

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

Pro PowerShell For Database Developers

Authors: Bryan P Cafferky

1st Edition

1484205413, 9781484205419

More Books

Students also viewed these Databases questions