qse:

Usage Arguments Examples

Usage

1
qse(x, q = 0.5, op = 3)

Arguments

x
q
op

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
##---- 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, q = 0.5, op = 3) 
{
    y <- sort(x)
    n <- length(x)
    iq <- floor(q * n + 0.5)
    qest <- y[iq]
    fhat <- NA
    if (op == 1) 
        fhat <- kerden(x, q)
    if (op == 2) 
        fhat <- rdplot(x, pts = qest, pyhat = TRUE, plotit = FALSE)
    if (op == 3) 
        fhat <- akerd(x, pts = qest, pyhat = TRUE, plotit = FALSE)
    if (is.na(fhat[1])) 
        stop("Something wrong, op should be 1 or 2 or 3")
    qse <- 1/(2 * sqrt(length(x)) * fhat)
    qse
  }

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