1 |
model |
|
which.coef |
|
levels |
|
Scheffe |
|
dfn |
|
center.pch |
|
center.cex |
|
segments |
|
xlab |
|
ylab |
|
las |
|
col |
|
lwd |
|
lty |
|
add |
|
... |
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 | ##---- 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 (model, which.coef, levels = 0.95, Scheffe = FALSE,
dfn = 2, center.pch = 19, center.cex = 1.5, segments = 51,
xlab, ylab, las = par("las"), col = palette()[2], lwd = 2,
lty = 1, add = FALSE, ...)
{
which.coef <- if (length(coefficients(model)) == 2)
c(1, 2)
else {
if (missing(which.coef)) {
if (any(names(coefficients(model)) == "(Intercept)"))
c(2, 3)
else c(1, 2)
}
else which.coef
}
coef <- coefficients(model)[which.coef]
xlab <- if (missing(xlab))
paste(names(coef)[1], "coefficient")
ylab <- if (missing(ylab))
paste(names(coef)[2], "coefficient")
if (missing(dfn)) {
if (Scheffe)
dfn <- sum(df.terms(model))
else 2
}
dfd <- df.residual(model)
shape <- vcov(model)[which.coef, which.coef]
ret <- numeric(0)
ret <- ell(coef, shape, sqrt(dfn * qf(levels, dfn, dfd)))
colnames(ret) <- c(xlab, ylab)
ret
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.