The winsorZ_find function is an optional companion to the winsorZ function. The winsorZ function identifies Z-score outliers and replaces with the next most extreme non-outlier value. The winsorZ_find function finds/identifies these Z-score outliers (outliers=1, non-outliers=0).

winsorZ_find(x, zbound = 3)

Arguments

x

The input variable to check for Z-score outliers.

zbound

The Z-score cutoff (default=3, i.e. outliers are Z>3 | Z<-3).

Value

Output logical variable of Z-score outliers

Examples

summary(winsorZ_find(psydat$iq))
#> 0 1 NA's #> 4804 17 179
if (FALSE) { psydat %>% mutate_at(c("iq", "anxT"), list(out = ~ winsorZ_find(.))) }