R/critK10.R

#****|==|====-====|====-====|====-====|====-====|====-====|====-====|==////////
#
#  traditional Grubbs-Beck critical values for 10% test; JRS Approximation
#
#.kngb   <- function(n){-0.9043+3.345*sqrt(log10(n))-0.4046*log10(n)}
# WHA: Tim's code codes not appear to use .kngb, but does a comparison via example
#critK10approxStedinger <- function(n) .kngb(n) # Jery Stedinger?????

#****|==|====-====|====-====|====-====|====-====|====-====|====-====|==////////
#
#  traditional Grubbs-Beck critical values for 10% test as in Bulletin 17B
#
"critK10" <- function(n) {
   if(min(n) < 10 | max(n) > 149) return(NA)
   dd <-
   c(2.036, 2.088, 2.134, 2.175, 2.213, 2.247, 2.279, 2.309, 2.335, 2.361, 2.385,
     2.408, 2.429, 2.448, 2.467, 2.486, 2.502, 2.519, 2.534, 2.549, 2.563, 2.577,
     2.591, 2.604, 2.616, 2.628, 2.639, 2.650, 2.661, 2.671, 2.682, 2.692, 2.700,
     2.710, 2.719, 2.727, 2.736, 2.744, 2.753, 2.760, 2.768, 2.775, 2.783, 2.790,
     2.798, 2.804, 2.811, 2.818, 2.824, 2.831, 2.837, 2.842, 2.849, 2.854, 2.860,
     2.866, 2.871, 2.877, 2.883, 2.888, 2.893, 2.897, 2.903, 2.908, 2.912, 2.917,
     2.922, 2.927, 2.931, 2.935, 2.940, 2.945, 2.949, 2.953, 2.957, 2.961, 2.966,
     2.970, 2.973, 2.977, 2.981, 2.984, 2.989, 2.993, 2.996, 3.000, 3.003, 3.006,
     3.011, 3.014, 3.017, 3.021, 3.024, 3.027, 3.030, 3.033, 3.037, 3.040, 3.043,
     3.046, 3.049, 3.052, 3.055, 3.058, 3.061, 3.064, 3.067, 3.070, 3.073, 3.075,
     3.078, 3.081, 3.083, 3.086, 3.089, 3.092, 3.095, 3.097, 3.100, 3.102, 3.104,
     3.107, 3.109, 3.112, 3.114, 3.116, 3.119, 3.122, 3.124, 3.126, 3.129, 3.131,
     3.133, 3.135, 3.138, 3.140, 3.142, 3.144, 3.146, 3.148)
  return(dd[n-9])
}

Try the MGBT package in your browser

Any scripts or data that you put into this service are public.

MGBT documentation built on July 22, 2021, 1:06 a.m.