All work must be done in R Consider the dataset prob20.dat <- matrix ( rnorm ( 8
ID: 3180827 • Letter: A
Question
All work must be done in R
Consider the dataset
prob20.dat <- matrix(rnorm(800),ncol=4,byrow=T)
prob20.dat[198:200,] <- prob20.dat[198:200,] + 10
Install the package mvoutlier and use the function in this library pcout to find the outliers in prob2.dat. Does the function correctly find the outlier in the data?
Consider the dataset prob 20.dat matrix (rnorm 800 ncol by row T) prob20 dat 198 200 J prob 20.dat[ 198 200 J 10 Install the package mvoutlier and use the function in this library pcout to find the outliers in prob2.dat. Does the function correctly find the outlier in the data?Explanation / Answer
This "pcout" function is used for identifying multivariate outliers in high dimensional and/or for large datasets. Please run this code for help :
?pcout()
This function executes some numerical vactors. You go through the help page which will open after running the above code.
To make a plot of the outliers of the corresponding variables, run this code.
pcout(prob20.dat,makeplot=TRUE)
You can show which observations are outliers.
Thank you.