gk.sigmamu:

Usage Arguments Examples

Usage

1
gk.sigmamu(x, c1 = 4.5, c2 = 3, mu.too = FALSE, ...)

Arguments

x
c1
c2
mu.too
...

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (x, c1 = 4.5, c2 = 3, mu.too = FALSE, ...) 
{
    n <- length(x)
    medx <- median(x)
    sigma0 <- median(abs(x - medx))
    w <- abs(x - medx)/sigma0
    w <- ifelse(w <= c1, (1 - (w/c1)^2)^2, 0)
    mu <- sum(x * w)/sum(w)
    x <- (x - mu)/sigma0
    rho <- x^2
    rho[rho > c2^2] <- c2^2
    sigma2 <- sigma0^2/n * sum(rho)
    if (mu.too) 
        c(mu, sqrt(sigma2))
    else sqrt(sigma2)
  }

musto101/wilcox_R documentation built on May 23, 2019, 10:52 a.m.