Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The hmeq _ small dataset contains information on 5 9 6 0 home equity loans, including 7 features on the characteristics of the loan. Load
The hmeqsmall dataset contains information on home equity loans, including features on the characteristics of the loan.
Load the data set hmeqsmall.csv as a data frame.
Create a new data frame with all the rows with missing data deleted.
Create a second data frame with the missing data in columns CLNO and YOJ filled in with the mean value of the column.
Print the summaries of the two new data frames.
Ex: Using only the first hundred rows, found in hmeqsample.csv the output is:
suppressPackageStartupMessageslibrarytidyverse
# Read in hmeqsmall.csv
hmeq # Your code here
hmeq$CLNO asnumerichmeq$CLNO
# Create a new data frame with the rows with missing values dropped
hmeqDelete # Your code here
# Create a new data frame with the missing values of CLNO and YOJ filled in by the mean of the column
meanCLNO meanhmeq$CLNO, narmTRUE
meanYOJ meanhmeq$YOJ, narmTRUE
hmeqReplace # Your code here
#Print the summary for each new data frame
printSummary of hmeqDelete is
summaryhmeqDelete
printSummary of hmeqReplace is
summaryhmeqReplace
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