Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

Week 6 Homework Week 6 Homework DATA 310 Problem 1 We are going to work again the ACS County Data to investigate the relationship between median household income and the percent of children...

1 answer below »
Week 6 Homework
Week 6 Homework
DATA 310
Problem 1
We are going to work again the ACS County Data to investigate the relationship between median household
income and the percent of children living in poverty in counties. Load in the “ACSCountyData.Rdata”
dataframe.
1. First, to make things more readable, recode the median.income variable to be expressed in thousands of
dollars.
2. Plot the relationship between median income on the x axis and percent child poverty on the y axis and
describe what you see.
3. Run a bi-variate linear regression on this relationship, discuss what the coefficients (including the
intercept) mean, and visualize the result on top of the scatterplot you produced above. Just to make
things easier for the next step, you may want to use code similar to this to plot the result:
ggplot(acs, aes(x=median.income, y=percent.child.poverty)) +
geom_point() +
ylim(0,100) +
labs(x="Median Income (Thousands)", y = "Percent Childen in Poverty") +
geom_smooth(method = lm, formula = y ~ poly(x, 1), se = FALSE)
4. Looking at this relationship visually, why doesn’t this regression satisfy Gauss-Markov Assumption
2 (functional form)? Add the square of median.income to your model and determine whether this
improves model fit, making reference to both the visual change in the regression line and to the R2 of
each model.
5. In this new regression with a second order polynomial term, what is the the effect of an additional $1000
in median income when median income is at $30k? What is the the effect of an additional $1000in
median income when median income is at $100k? Does this make theoretical sense?
6. A possible confounding variable to this relationship is the unemployment rate, which may affect both
the median income of a county and the percent of children living in poverty. Use the cor()function
to investigate the relationships between median income, unemployment, and child poverty. Based
onthe pattern of co
elations, what is likely to happen to the coefficient on median.income if you add
unemployment rate to the first regression model (the one without the polynomial terms)?
7. Run this regression with unemployment rate and median income (no polynomial terms), and determine
the degree to which the coefficient on median.income changes. Interpret the other coefficients in the
model as well, being sure to adjust your language to the fact that there are now multiple indpeendent
variables.
8. Another possible confounding variable is the census region people are living in. For example, living
in the south could be associated with both lower average incomes and more child poverty. Create an
indicator variable for the 4 census regions (or change the variable into a factor variable) and then
e-estimate the regression with median income and unemployment to take into account which region
each county is in. Interpret the coefficients from this regression.
1
9. It’s possible that the effect of median income is different conditional on whether a county is u
an o
not. Create an indicator variable for whether a county is u
an (population density greater or equalto
1000) or not. Interact this variable with median income in the regression with unemployment rate and
census region indicators. Interpret the coefficients on median income, the u
an indicator, and the
interaction term.
2
    Problem 1
Answered 7 days After Feb 14, 2023

Solution

Monica answered on Feb 19 2023
36 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here