Description Usage Arguments Value Examples
Retrieves the bottom and top boundaries to flag outliers or extreme values, according to the Hampel method. This technique takes into account the median and MAD value, which is a is a robust measure of the variability of a univariate sample of quantitative data (Wikipedia). Similar to standard deviation but less sensitve to outliers. This function is used in 'prep_outliers' function. All 'NA's values are automatically excluded. More information at: https://livebook.datascienceheroes.com/data-preparation.html#how_to_deal_with_outliers_in_r.
1 | hampel_outlier(input, k_mad_value = 3)
|
input |
Numeric variable vector |
k_mad_value |
'K' multiplier for the median absolute deviation. The higher the value, the more outliers will be detected. Default value=3 (it's an standad) |
A two-item vector, the first value represents the bottom threshold, while the second one is the top threshold
1 2 3 4 | ## Not run:
hampel_outlier(heart_disease$age)
## End(Not run)
|
Loading required package: Hmisc
Loading required package: lattice
Loading required package: survival
Loading required package: Formula
Loading required package: ggplot2
Attaching package: 'Hmisc'
The following objects are masked from 'package:base':
format.pval, units
sh: 1: cannot create /dev/null: Permission denied
funModeling v.1.7 :)
Examples and tutorials at livebook.datascienceheroes.com
bottom_threshold top_threshold
29.3132 82.6868
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.