Answered step by step
Verified Expert Solution
Question
1 Approved Answer
# Q10 # Use the mean() function to compute ####### the average lot frontage for the trImp dataset. I've tried mean(trImp$Lot.Frontage, na.rm = TRUE) But
# Q10 # Use the mean() function to compute ####### the average lot frontage for the trImp dataset.
I've tried
mean(trImp$Lot.Frontage, na.rm = TRUE)
But it says its nor correct. What is the correct answer?
Q10 - Run str (trImp) in R to see that any columns that had missing values were replaced by 2 new columns: - Any column that had imputed data now has a .x appended to the column name - This column contains the original values and imputed values that replaced the missing values in the original column. - For quantitative data, the default settings of naref () imputes either the mean of the rest of the values for a column (mean imputation) or a 0 in place of the missing data ( 0 imputation). - For factors, naref() made missing values an additional level of the variable. Now, > is the reference level (the level that serves as a baseline category). - The second new column has .miss appended to the column name - This column contains an indicator variable for which entries were imputed. A 1 indicates an imputed value (it was originally missing) and a 0 means it's the original value Use the mean () function to compute the average lot frontage for the trImp dataset
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