Question: I really need some help for a few questions in Rstudio: The file is called gss on Rstudio but I only need some help for

I really need some help for a few questions in Rstudio:

The file is called "gss" on Rstudio but I only need some help for how to make my program run

and here are the questions:

1. Recode the variable income in the gss dataset: make a new variable income1 by copying all values of income; replace all values DK and REFUSED by the value NA; use the command levels() to replace all intervals by their midpoint, i.e. use 2000 instead of $1000 TO 2999, use end points, if the interval is one-sided; cast the income1 variable to the numeric variable, and then get the appropriate graph to visualize it.

2. Make a summary of year. It should be treated as a factor variable. Turn it into a new factor variable YEAR. Make a new summary of YEAR, which year had the most respondents? Moreover, get average income1 of respondents at each YEAR.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!