Skip to contents

Source: NIST/SEMATECH e-Handbook of Statistical Methods, section 1.3.5.17.3, which states Rosner (1983, Technometrics 25, 165-172) in full: R_i = max |x_i - xbar| / s recomputed after each removal, with critical values lambda_i = (n-i) t_{p,n-i-1} / sqrt((n-i-1+t^2)(n-i+1)) and p = 1 - alpha / (2(n-i+1)). The number of outliers is the largest i with R_i > lambda_i. The handbook worked example (Rosner 54-point data set, r = 10, alpha = 0.05) gives R_1 = 3.118, lambda_1 = 3.158 and three outliers.

Usage

Gesd(x, alpha = 0.05, r = NULL)

Arguments

x

Numeric vector, approximately normal under H0.

alpha

Significance level. Default 0.05.

r

Upper bound on the number of outliers. Default max(1, n %/% 10).

Value

list: n_outliers, outlier_index, R, lam, alpha, r, n, method.

Examples

Gesd(c(1:20, 40), 0.05, 3)$n_outliers
#> [1] 1