1 |
x |
|
y |
|
nboot |
|
alpha |
|
kappa |
|
SEED |
|
xout |
|
outfun |
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 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | ##---- 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, y, nboot = 2000, alpha = 0.05, kappa = 0.05, SEED = TRUE,
xout = FALSE, outfun = out)
{
ep = 1e-08
B = nboot
kappa
level = alpha
if (SEED)
set.seed(2)
Z = elimna(cbind(x, y))
if (xout) {
flag <- outfun(Z[, 1], plotit = FALSE, SEED = SEED)$keep
Z <- Z[flag, ]
}
p = 3
n = nrow(Z)
HT = HuberTun(kappa, p)
r = HT$r
tau = HT$tau
H = robEst(Z, r, tau, ep)
R.v = H$u2 * tau
oH = order(R.v)
oCaseH = (1:n)[oH]
oR.v = R.v[oH]
thetaH = H$theta
aH = thetaH[1]
bH = thetaH[2]
abH = aH * bH
muH = H$mu
SigmaH = H$Sigma
dH = H$d
thetaH = H$theta
aH = thetaH[1]
bH = thetaH[2]
abH = aH * bH
muH = H$mu
SigmaH = H$Sigma
dH = H$d
RH = SErob(Z, muH, SigmaH, thetaH, dH, r, tau)
Zr = RH$Zr
SEHI = RH$inf
SEHS = RH$sand
RH = SErob(Z, muH, SigmaH, thetaH, dH, r, tau)
Zr = RH$Zr
SEHI = RH$inf
SEHS = RH$sand
RH = SErob(Z, muH, SigmaH, thetaH, dH, r, tau)
Zr = RH$Zr
SEHI = RH$inf
SEHS = RH$sand
ParEstH <- round(cbind(thetaH, SEHI[1:6], SEHS[1:6]), 3)
rnames <- c("a", "b", "c", "vx", "vem", "vey")
ParEstH <- cbind(rnames, ParEstH)
res = t(ParEstH)
Res = BCI(Z, Zr, ab = 3, abH, B, level)
list(CI.ab = Res$CI, p.value = Res$pv, a.est = aH, b.est = bH,
ab.est = abH)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.