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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started