plot_biv_olr: Forrest plot from ordinal logistic regression, version2 of...

View source: R/plot_biv_olr.R

plot_biv_olrR Documentation

Forrest plot from ordinal logistic regression, version2 of plot_ord_ords().

Description

Heavily inspired by https://www.r-bloggers.com/plotting-odds-ratios-aka-a-forrestplot-with-ggplot2/

Usage

plot_biv_olr(
  meas,
  vars,
  data,
  title = NULL,
  dec = 3,
  lbls = NULL,
  hori = "OR (95 % CI)",
  vert = "Variables",
  short = FALSE,
  analysis = c("biv", "multi")
)

Arguments

meas

outcome meassure variable name or response in data-data.frame as a string. Should be factor, preferably ordered.

vars

variables to compare against. As vector of columnnames.

data

dataframe of data.

title

plot title

dec

decimals for labels

lbls

labels for variable names. Carefull, as the right order is not checked automatically!

hori

labels the horizontal axis (this i the y axis as the plot is rotated)

vert

labels the horizontal axis (this i the x axis as the plot is rotated)

short

flag to half number of ticks on horizontal axis.

analysis

can be either "biv", or "multi", for creation of forest plot from either bivariate (unadjusted) or multivariate (adjusted) ordinal logistic regression.


agdamsbo/daDoctoR documentation built on Aug. 30, 2022, 4:29 p.m.