ggforest: Creates a forest plot

Description Usage Arguments Value Examples

View source: R/ggforest.R

Description

Creates a forest plot

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
ggforest(
  model,
  include.intercept = FALSE,
  categories = NULL,
  color.scheme = NULL,
  title = NULL,
  xlab = "Terms",
  ylab = "Log OR",
  errorbar = TRUE,
  errorbar.width = 0.3,
  linetype = "dashed",
  point.size = 3,
  point.alpha = 1,
  ggtheme = theme_classic(),
  ...
)

Arguments

model

A fitted logistic regression model object

include.intercept

Whether to include the model intercept within the plot

categories

A named list containing the grouping of terms (e.g. list(Race = c("RACE"), SocioDemographics = c("AGE", "SEX")))

color.scheme

A named list containing the coloring for each category

title

Plot title

xlab

x label

ylab

y label

errorbar

Whether to draw errorbars

errorbar.width

The width of the errorbars

linetype

The linetype of the reference line

point.size

Point size

point.alpha

Alpha value of the points

ggtheme

ggplot theme

...

Other parameters passed to ggplot

Value

A forest plot

Examples

1
2
3
4
5
## Not run: 
model <- glm(y ~ x, data=data, family=binomial)
ggforest(model)

## End(Not run)

ShozenD/caresri documentation built on Dec. 18, 2021, 1:07 p.m.