Learn R Programming

qgg (version 1.1.6)

plotForest: Forest plot

Description

This function generates a forest plot, which is commonly used to visualize effect sizes and their confidence intervals.

Usage

plotForest(
  x = NULL,
  sd = NULL,
  cex = 1,
  mar = NULL,
  mai = NULL,
  xlim = NULL,
  pos = NULL,
  reorder = TRUE,
  xaxis = TRUE,
  main = NULL,
  xlab = "x"
)

Arguments

x

A vector of point estimates or effect sizes.

sd

A vector of standard deviations corresponding to the values in `x`.

cex

A numerical value indicating the amount by which plotting text and symbols should be scaled. Default is 1.

mar

A numerical vector of the form `c(bottom, left, top, right)` which gives the number of lines of margin to be specified on the four sides of the plot. Default is `c(5,12,3,1)`.

mai

A numerical vector indicating the margins in inches.

xlim

The x limits (x1, x2) of the plot.

pos

Position of y-axis labels.

reorder

A logical value. If `TRUE`, data points are reordered based on the values in `x`. Default is `TRUE`.

xaxis

A logical value. If `TRUE`, x-axis is drawn. Default is `TRUE`.

main

An overall title for the plot.

xlab

A label for the x-axis. Default is "x".