1 |
x |
|
y |
|
est |
|
scat |
|
fr |
|
plotit |
|
pyhat |
|
efr |
|
theta |
|
phi |
|
SCALE |
|
expand |
|
SEED |
|
nmin |
|
xout |
|
outfun |
|
eout |
|
xlab |
|
ylab |
|
zlab |
|
pr |
|
duplicate |
|
zscale |
|
... |
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 | ##---- 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, est = mean, scat = TRUE, fr = NULL, plotit = TRUE,
pyhat = FALSE, efr = 0.5, theta = 50, phi = 25, SCALE = FALSE,
expand = 0.5, SEED = TRUE, nmin = 0, xout = FALSE, outfun = outpro,
eout = FALSE, xlab = "X", ylab = "Y", zlab = "", pr = TRUE,
duplicate = "error", zscale = TRUE, ...)
{
yy = elimna(y)
nchk = length(yy)
chky = sum((yy == 1)) + sum((yy == 0))
if (nchk != chky)
print("Warning: some y values are not equal to 0 or 1")
x <- as.matrix(x)
if (ncol(x) == 1) {
if (is.null(fr))
fr = 0.8
val <- rungen(x, y, est = est, scat = scat, fr = fr,
plotit = plotit, pyhat = TRUE, eout = eout, xout = xout,
outfun = outfun, xlab = xlab, ylab = ylab, ...)
val2 <- rungen(x, y, est = est, fr = efr, plotit = FALSE,
pyhat = TRUE, eout = eout, xout = xout, outfun = outfun,
...)$output
val <- val$output
}
if (ncol(x) > 1) {
if (is.null(fr))
fr = 1.2
if (ncol(x) == 2 && !scale) {
if (pr) {
print("scale=F is specified.")
print("If there is dependence, might want to use scale=T")
}
}
val <- rung3dv2(x, y, est = est, fr = fr, plotit = plotit,
pyhat = TRUE, SEED = SEED, nmin = nmin, xout = xout,
outfun = outfun, scale = scale, phi = phi, theta = theta,
expand = expand, duplicate = "error", zscale = zscale,
xlab = xlab, ylab = ylab, zlab = zlab, ...)
}
if (!pyhat)
val <- NULL
list(yhat = val)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.