Question: basic way to answer this question in R please. data set is not able to be provided. any help appreciated. thanks need more explaning 2.
2. (40 points) Work on the following items step by step. a. (35 pts) Write a function (name it outlier_remover) that will first detect the values beyond +2 standard deviation of the mean for each numeric variable in a .csv data file, and then delete the rows including these values in each numeric variable. Note that if a variable has a data type other than numeric type, function should not perform any operation for that variable. (Note: Statistically, values beyond #3 standard deviation of the mean would be considered as outliers, but for practice purposes we will use +2 as a benchmark) b. (5 pts) Use promotion.csv file to test your function. After removing the outliers, how many observations do you have in your data set? 2. (40 points) Work on the following items step by step. a. (35 pts) Write a function (name it outlier_remover) that will first detect the values beyond +2 standard deviation of the mean for each numeric variable in a .csv data file, and then delete the rows including these values in each numeric variable. Note that if a variable has a data type other than numeric type, function should not perform any operation for that variable. (Note: Statistically, values beyond #3 standard deviation of the mean would be considered as outliers, but for practice purposes we will use +2 as a benchmark) b. (5 pts) Use promotion.csv file to test your function. After removing the outliers, how many observations do you have in your data set
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
