Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please when answering, include the codes so I can learn for next time! Thank you 1b) (15 points) Summarize hourly wages HRLYEARN. Do not forget
please when answering, include the codes so I can learn for next time! Thank you
1b) (15 points) Summarize hourly wages HRLYEARN. Do not forget to prefix the variable name by the dataframe name. How many observations with zero hourly wages are there? How many observations with missing hourly wages? Who do you think are those individuals with missing wages? Compute ("mutate") the log of hourly wages, lwage =log (HRLYEARN) What is the mean hourly wage? What is the mean log wage? Provide two histograms: one for the hourly wage variable, one for the log wage variable. Which histogram appears closer to a normal distribution? Note: the simplest way to make a histogram (using the ggplot visualisation from the tidiverse library): ggplot (mydata, aes ( x= HRLYEARN) ) + geom histogram () ggplot (mydata, aes ( x=1 wage)) + geom_histogram () These plots are a basic and you can improve on the visualisation if you are feeling ambitious by adding parameters to the ggplot commands (In the answer key I will leave it as in the basic example from above). Here is one possible source for inspiration (there are many): http://www.sthda.com/english/wiki/ggplot2-histogram-plot-quick-start-guide-rsoftware-and-data-visualization Console Terminal dackground Jobs (R R4.2.2 - -/Desktop/ECON*3740r y - with 110,049 rore rows 1 Use "print (n=)2 to see more rows sumnarize(mydata, HRL YEARN-21.15) A tibble: 110,0591 HRLYEARN =21.15 " clgis TRUE NA NA MA 5. NA (6) NA 7. FALSE 1. FALSE 9NA 10. NA 8 - with 110,049 more rost 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