powt1est:

Usage Arguments Examples

Usage

1
powt1est(x, delta = 0, ci = FALSE, nboot = 800)

Arguments

x
delta
ci
nboot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
##---- 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, delta = 0, ci = FALSE, nboot = 800) 
{
    temp1 <- powest(x, rep(0, 5), delta, se = trimse(x))
    if (ci) {
        set.seed(2)
        pboot <- NA
        datay <- rep(0, 5)
        print("Taking bootstrap samples. Please wait.")
        datax <- matrix(sample(x, size = length(x) * nboot, replace = TRUE), 
            nrow = nboot)
        for (i in 1:nboot) {
            se <- trimse(datax[i, ])
            pboot[i] <- powest(x, rep(0, 5), delta, se)
        }
        temp <- sort(pboot)
    }
    ll <- floor(0.05 * nboot + 0.5)
    list(est.power = temp1, ci = temp[ll])
  }

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