I want to check the outlier value of each variable in R and change the outlier value of the variable to a specific value.
Many people have written in stackoverflow to recommend the outlierTest
function in the car package.
The outlierTest function, however, extracted the result of a particular row, not variable.
I want a variable to have an outlier and to change that value to a specific value. What functions and code should I use?
+Here is my data code. It it open source. So you can load that data as following code.
credit<-read.csv("http://freakonometrics.free.fr/german_credit.csv", header=TRUE)
F=c(1,2,4,5,7,8,9,10,11,12,13,15,16,17,18,19,20,21)
for(i in F) credit[,i]=as.factor(credit[,i])