[R] Normal probability plot of effects
kjetil halvorsen
kjetilh at umsanet.edu.bo
Sat Jul 27 00:29:25 CEST 2002
I have a local function:
> qqnorm.aov
function (obj, full = FALSE, label = FALSE, omit = NULL, xlab = paste(if
(full) "" else "Half",
" Normal plot"), ylab = "Effects", ...)
{
r <- obj$rank
eff <- if (full)
effects(obj, set.sign = TRUE)[1:r]
else abs(effects(obj))[1:r]
na <- names(eff)
int <- match("(Intercept)", na)
if (!is.null(omit)) {
if (is.character(omit)) {
int <- c(int, match(omit, na))
}
else int <- c(int, omit)
}
int <- int[!is.na(int)]
if (length(int))
eff <- eff[-int]
n <- length(eff)
if (n <= 0)
stop("Not enough effects")
ord <- order(eff)
na <- names(eff)
P <- if (full)
ppoints(n)
else ((1:n) + n)/(2 * n + 1)
Q <- qnorm(P)
plot(x = Q, y = eff[ord], xlab = xlab, ylab = ylab, ...)
if (label && dev.interactive())
identify(Q, eff[ord], names(eff)[ord])
}
which is an incomplete implementation of the s function with the same
name. It could help. (It is of course most usefull for orthogonal
designs)
Kjetil Halvorsen
Kyriakos Kachrimanis wrote:
>
> Can anybody help me on this, please:
>
> I want to produce a normal probability plot of effects for an unreplicated
> design with 4 factors. 2 of the factors have 2 levels and the other 2 have 4
> levels. Is it possible to produce such a graph?
> I want to use this graph to decide which interaction effects are negligible
> to combine them as an estimate of error.
> Thank you in advance.
>
> Kyriakos Kachrimanis
>
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list