10. Use the following code to create a new data set 2 mark ` select(id, starts_with("side"), starts_with("pie"), starts_

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

10. Use the following code to create a new data set 2 mark ` select(id, starts_with("side"), starts_with("pie"), starts_

Post by answerhappygod »

10. Use the following code to create a new data set 2 mark
` select(id, starts_with("side"), starts_with("pie"),
starts_with("dessert")) %>% select(-side15, -pie13, -dessert12)
%>% gather(type, value, -id) %>% filter(!is.na(value), !value
%in% c("None", "Other (please specify)")) %>% mutate(type =
str_remove(type, "\\d+")) `
Write 2-3 sentences with your explanation of what it does.
11-12. Install package `widyr` and use `pairwise_cor()`
function
Write 2-3 sentences with your explanation of what it does.
Use this code for the new dataset ` pairwise_cor(value, id,
sort = TRUE) ` Write 1 sentence with your explanation of what
insights it shows.
13. Use `lm()` or randomForest() function to build a model that
predict a family income based on data in the dataset.
Compare 3 models using different set of input variables. Use
different number of variables.
Explain your choice of variables (3 sentences)
Write 2 sentences explaining which model is best.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply