search for: perc_low

Displaying 1 result from an estimated 1 matches for "perc_low".

2011 Sep 28
1
removing outliers in non-normal distributions
...to answer these questions in advance.) Currently we Winsorize using the quantile function to get the new high and low values to set the outliers to on the high end and low end (this is summarized legacy code that I am revisiting): #Get the truncated values for resetting: lowq = quantile(dat,probs=perc_low,na.rm=TRUE) hiq = quantile(dat,probs=perc_hi,na.rm=TRUE) #resetting the highest and lowest values with the truncated values: dat[lowq>dat] = lowq dat[hiq<dat] = hiq What I don't like about this is that it always truncates values (whether they truly are outliers or not) and the perc_low...