R: Forest plots

forestplot {rmeta} | R Documentation

## Forest plots

### Description

Draw a forest plot together with a table of text.

### Usage

    forestplot(labeltext, mean, lower, upper, align = NULL, is.summary =
    FALSE, clip = c(-Inf, Inf), xlab = "", zero = 0, graphwidth = unit(2,
    "inches"), col = meta.colors(), xlog = FALSE, xticks=NULL, boxsize=NULL,...)

### Arguments

`labeltext` | Matrix of strings or `NA`s for blank spaces
`mean` | Vector of centers of confidence intervals (or `NA`s for blank space)
`lower` | Vector of lower ends of confidence intervals
`upper` | Vector of upper ends of confidence intervals
`align` | Vector giving alignment (`l`,`r`,`c`) for columns of table
`is.summary` | Vector of logicals. Summary lines have bold text and diamond confidence intervals.
`clip` | Lower and upper limits for clipping confidence intervals to arrows
`xlab` | x-axis label
`zero` | x-axis coordinate for zero line
`graphwidth` | Width of confidence interval graph
`col` | See `meta.colors`
`xlog` | If `TRUE`, x-axis tick marks are exponentiated
`xticks` | Optional user-specified x-axis tick marks. Specify `NULL` to use the defaults, `numeric(0)` to omit the x-axis.
`boxsize` | Override the default box size based on precision
`...` | Not used.

### Details

This function is more flexible than `metaplot` and the `plot` methods for meta-analysis objects, but requires more work by the user.

In particular, it allows for a table of text, and clips confidence intervals to arrows when they exceed specified limits.

### Value

None

### See Also

`metaplot`

### Examples

    data(cochrane)
    steroid <- meta.MH(n.trt, n.ctrl, ev.trt, ev.ctrl,
                            names=name, data=cochrane)

    tabletext<-cbind(c("","Study",steroid$names,NA,"Summary"),
                     c("Deaths","(steroid)",cochrane$ev.trt,NA,NA),
                     c("Deaths","(placebo)", cochrane$ev.ctrl, NA,NA),
                     c("","OR",format(exp(steroid$logOR),digits=2),NA,format(exp(steroid$logMH),digits=2))
                     )

    m<- c(NA,NA,steroid$logOR,NA,steroid$logMH)
    l<- m-c(NA,NA,steroid$selogOR,NA,steroid$selogMH)*2
    u<- m+c(NA,NA,steroid$selogOR,NA,steroid$selogMH)*2
    forestplot(tabletext,m,l,u,zero=0,is.summary=c(TRUE,TRUE,rep(FALSE,8),TRUE),
       clip=c(log(0.1),log(2.5)), xlog=TRUE,
       col=meta.colors(box="royalblue",line="darkblue", summary="royalblue"))

    forestplot(tabletext,m,l,u,zero=0,is.summary=c(TRUE,TRUE,rep(FALSE,8),TRUE),
       clip=c(log(0.1),log(2.5)), xlog=TRUE, boxsize=0.75,
       col=meta.colors(box="royalblue",line="darkblue", summary="royalblue"))

[Package rmeta version 2.16 Index]