Читать книгу The Big R-Book - Philippe J. S. De Brouwer - Страница 267
Hint – Outliers
ОглавлениеThe mean is highly influenced by the outliers. To mitigate this to some extend the parameter trim
allows to remove the tails. It will sort all values and then remove the x% smallest and x% largest observations.
v <- c(1,2,3,4,5,6000) mean(v) ## [1] 1002.5 mean(v, trim = 0.2) ## [1] 3.5