stein2:

Usage Arguments Examples

Usage

1
stein2(x1, x2, mu0 = 0, alpha = 0.05)

Arguments

x1
x2
mu0
alpha

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
##---- 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 (x1, x2, mu0 = 0, alpha = 0.05) 
{
    n <- length(x1)
    df <- n - 1
    N <- n + length(x2)
    test <- sqrt(N) * (mean(c(x1, x2)) - mu0)/sqrt(var(x1))
    crit <- qt(1 - alpha/2, df)
    low <- mean(c(x1, x2)) - crit * sqrt(var(x1))
    up <- mean(c(x1, x2)) + crit * sqrt(var(x1))
    sig <- 2 * (1 - pt(test, df))
    list(ci = c(low, up), siglevel = sig, mean = mean(c(x1, x2)), 
        teststat = test, crit = crit, df = df)
  }

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