1 |
Z |
|
Zr |
|
ab |
|
abH |
|
B |
|
level |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | ##---- 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 (Z, Zr, ab = NULL, abH, B, level)
{
p = ncol(Z)
n = nrow(Z)
abhatH.v = matrix(NA, B)
Index.m = matrix(NA, n, B)
t1 = 0
t2 = 0
for (i in 1:B) {
U = runif(n, min = 1, max = n + 1)
index = floor(U)
Index.m[, i] = index
Zrb = Zr[index, ]
SH = MeanCov(Zrb)$S
thetaH = MLEst(SH)
abhatH = thetaH[1] * thetaH[2]
abhatH.v[i] = abhatH
if (abhatH < abH) {
t2 = t2 + 1
}
}
abhatH.v = abhatH.v[!is.na(abhatH.v)]
SEBH = sd(abhatH.v)
CI2 = BpBCa(Zr, abhatH.v, t2, level)
Results = list(CI = CI2[[1]], pv = CI2[[2]])
return(Results)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.