1 | rplot(x, y, est = tmean, scat = TRUE, fr = NA, plotit = TRUE, pyhat = FALSE, efr = 0.5, theta = 50, phi = 25, scale = TRUE, expand = 0.5, SEED = TRUE, varfun = pbvar, outfun = outpro, nmin = 0, xout = FALSE, out = FALSE, eout = FALSE, xlab = "X", ylab = "Y", zscale = FALSE, zlab = " ", pr = TRUE, duplicate = "error", ticktype = "simple", LP = TRUE, OLD = FALSE, pch = ".", prm = TRUE, ...)
|
x |
|
y |
|
est |
|
scat |
|
fr |
|
plotit |
|
pyhat |
|
efr |
|
theta |
|
phi |
|
scale |
|
expand |
|
SEED |
|
varfun |
|
outfun |
|
nmin |
|
xout |
|
out |
|
eout |
|
xlab |
|
ylab |
|
zscale |
|
zlab |
|
pr |
|
duplicate |
|
ticktype |
|
LP |
|
OLD |
|
pch |
|
prm |
|
... |
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 64 65 66 67 68 69 70 71 72 73 74 75 76 | ##---- 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 = tmean, scat = TRUE, fr = NA, plotit = TRUE,
pyhat = FALSE, efr = 0.5, theta = 50, phi = 25, scale = TRUE,
expand = 0.5, SEED = TRUE, varfun = pbvar, outfun = outpro,
nmin = 0, xout = FALSE, out = FALSE, eout = FALSE, xlab = "X",
ylab = "Y", zscale = FALSE, zlab = " ", pr = TRUE, duplicate = "error",
ticktype = "simple", LP = TRUE, OLD = FALSE, pch = ".", prm = TRUE,
...)
{
x <- as.matrix(x)
p = ncol(x)
if (pr && !OLD)
print("A new estimate of the strength of the association is used by default. To get the old estimate, set OLD=TRUE")
xx <- cbind(x, y)
xx <- elimna(xx)
if (eout) {
flag = outfun(xx, plotit = FALSE, ...)$keep
xx = xx[flag, ]
}
if (xout) {
flag = outfun(xx[, 1:p], plotit = FALSE, ...)$keep
xx = xx[flag, ]
}
x <- xx[, 1:p]
x <- as.matrix(x)
p1 = ncol(x) + 1
y <- xx[, p1]
if (ncol(x) == 1) {
if (is.na(fr))
fr <- 0.8
val <- rungen(x, y, est = est, scat = scat, fr = fr,
plotit = plotit, pyhat = TRUE, xlab = xlab, ylab = ylab,
LP = LP, pch = pch, ...)
val2 <- rungen(x, y, est = est, fr = efr, plotit = FALSE,
pyhat = TRUE, LP = FALSE, ...)$output
val <- val$output
}
if (ncol(x) > 1) {
if (ncol(x) == 2 && !scale) {
if (pr) {
print("scale=FALSE is specified.")
print("If there is dependence, might want to use scale=T")
}
}
if (is.na(fr))
fr <- 1
val <- rung3d(x, y, est = est, fr = fr, plotit = plotit,
pyhat = TRUE, SEED = SEED, nmin = nmin, LP = LP,
scale = scale, phi = phi, theta = theta, expand = expand,
zscale = zscale, pr = FALSE, duplicate = "error",
xlab = xlab, ylab = ylab, zlab = zlab, ticktype = ticktype,
...)
}
E.power = NULL
if (OLD) {
E.power = varfun(val)/varfun(y)
if (E.power > 1)
E.power = 0.99
}
if (!OLD)
E.power = smRstr(x, y, fr = fr)$str^2
stra = sqrt(E.power)
if (!pyhat)
val <- NULL
if (!prm) {
stra = NULL
E.power = NULL
val = NULL
}
list(Strength.Assoc = stra, Explanatory.Power = E.power,
yhat = val)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.