Learn R Programming

scipub (version 1.3.0)

winsorZ_find: Identify outliers based on z-score cutoff that are Winsorized by the winsorZ function

Description

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).

Usage

winsorZ_find(x, zbound = 3)

Value

Output logical variable of Z-score outliers

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).

Examples

Run this code
summary(winsorZ_find(psydat$iq))
if (FALSE) {
psydat %>% mutate_at(c("iq", "anxT"), list(out = ~ winsorZ_find(.)))
}

Run the code above in your browser using DataLab