Description Usage Arguments Details Examples
Performs a t-score test for outliers.
1 2 3 4 5 6 | outlier_tscore(
x,
mask = !is.na(x),
threshold = c(0.9, 0.95),
return.score = FALSE
)
|
x |
A vector of data. |
mask |
A logical vector that defines which values in |
threshold |
A length-two vector identifying thresholds for "mild" and "extreme" outliers. |
return.score |
if |
The values of threshold
identify the quantiles of the
t-distribution used to identify mild and extreme outliers.
Default values are 0.9 for "mild" outliers and 0.95 for "extreme"
outliers.
The t-score is equivalent to the z-score for sample sizes greater than 30.
1 2 3 4 5 6 7 8 9 | x = seq(0, 34, by = 0.25)*pi
noise = rnorm(length(x), mean = 1, sd = 3)
y = sin(x) + noise
mask = noise < 1
outlier_tscore(y)
outlier_tscore(y, mask)
outlier_tscore(y, mask, threshold = c(0.8, 0.9))
outlier_tscore(y, return.score = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.