Question: . Data Inspection: ( a ) ( 1 pt ) How many observations are there in the dataset? How many variables are there in the

. Data Inspection:
(a)(1pt) How many observations are there in the dataset? How many variables are
there in the dataset?
(b)(1.5pt) For each variable, how many missing entries are there? Also, give the
line or lines of R code used to find this answer.
(c)(0.5pt) Using the sort() function, find the largest income for an individual in
the dataset. Also give the line or lines of R code to find this answer.
2. Data Cleaning:
(a)(1pt) Remove all individuals from the dataset with 0 income. Give the line or
lines of R code for this step.
(b)(1pt) Afterward, replace all missing incomes with the median of the non-missing
incomes. Give the line or lines of R code for this step.
(c)(1pt) Apply the log transformation (either base e or base 10) to the incomes and
add this as a column to the NLS2023 data frame. Give the line or lines of R code
to perform these steps.
(d)(1pt) Apply the square root transformation to weights and add this as a column
to the NLS data frame. Give the line or lines of R code to perform these steps.
(e)(1pt) Change the fourth entry of the Urban variable to your name. Give the line
or lines of R code to perform these steps.
(f)(2pt) After performing steps 2(a),(b),(c),(d), and (e), export this cleaned
dataset as a .csv file called CleanNLS.csv. Give the line or lines of R code to
perform this step. Also, upload this file onto Canvas.
1

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!