File: plot.R

package info (click to toggle)
multcomp 0.991-2-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 548 kB
  • sloc: sh: 43; makefile: 1
file content (22 lines) | stat: -rw-r--r-- 840 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

### uhhh -- mainly copy and paste from plot.TukeyHSD
plot.confint.glht <- function(x, ...) {

    xi <- x$confint
    yvals <- nrow(xi):1
    plot(c(xi[, "lwr"], xi[, "upr"]), rep.int(yvals, 2), 
         type = "n", axes = FALSE, xlab = "", ylab = "", ...)
    axis(1, ...)
    axis(2, at = nrow(xi):1, labels = dimnames(xi)[[1]], 
         srt = 0, ...)
    abline(h = yvals, lty = 1, lwd = 0, col = "lightgray")
    abline(v = 0, lty = 2, lwd = 0, ...)
    segments(xi[, "lwr"], yvals, xi[, "upr"], yvals, ...)
    points(xi[, "lwr"], yvals, pch = "(", ...)
    points(xi[, "upr"], yvals, pch = ")", ...)
    points(xi[, "Estimate"], yvals, pch = 20, ...)
    title(main = paste(format(100 * attr(x$confint, "conf.level"), 
          2), "% family-wise confidence level\n", sep = ""), 
          xlab = "Linear Hypotheses")
    box()
}