Description Usage Arguments Details Value See Also Examples
To be used inside treat()
to avoid repetitions. Winsorises a numerical vector of data.
1 2 3 4 5 6 7 8 
icol 
The vector of data to Winsorise 
winmax 
The maximum number of points to Winsorise for each indicator. If 
winchange 
Logical: if 
t_skew 
Absolute skew threshold (default 2). 
t_kurt 
Kurtosis threshold (default 3.5). 
icode 
The indicator name  used for error messages in 
Outliers are identified according to skewness and kurtosis thresholds. The algorithm attempts to reduce the absolute skew and kurtosis by successively Winsorising points up to a specified limit.
The process is detailed in the COINr online documentation.
A list containing:
.$icol
the vector of treated data
.$imax
the indices of elements of the vector that were Winsorised as high values
.$imax
the indices of elements of the vector that were Winsorised as low values
.$winz
the total number of Winsorised points
treat()
Outlier treatment
1 2 3 4 5 6 7 8 9  # get a column of data with outliers
x < ASEMIndData$Tariff
# Winsorise up to five points
winlist < coin_win(x, winmax = 5)
# check the differences
data.frame(
Orig = x,
Treated = winlist$icol,
Changes = ifelse(x == winlist$icol, "Same", "Treated"))

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.