check_SkewKurt {COINr} | R Documentation |
Logical test: if abs(skewness) < skew_thresh
OR kurtosis < kurt_thresh
, returns TRUE
, else FALSE
check_SkewKurt(x, na.rm = FALSE, skew_thresh = 2, kurt_thresh = 3.5)
x |
A numeric vector. |
na.rm |
Set |
skew_thresh |
A threshold for absolute skewness (positive). Default 2.25. |
kurt_thresh |
A threshold for kurtosis. Default 3.5. |
A list with .$Pass
is a Logical, where TRUE
is pass, FALSE
is fail, and .$Details
is a
sub-list with skew and kurtosis values.
set.seed(100)
x <- runif(20)
# this passes
check_SkewKurt(x)
# if we add an outlier, doesn't pass
check_SkewKurt(c(x, 1000))