comparative.plot: Comparative Plot

Description Usage Arguments Examples

View source: R/basic_functions.R

Description

This function creates a comparative within a tretment variable.

Usage

1
2
3
4
5
6
7
8
comparative.plot(
  data,
  exposure,
  outcome,
  method = "boxplot",
  adjustment = 3,
  title = "Comparative Plot"
)

Arguments

data

defines a data frame.

exposure

defines the exposure variable

outcome

defines the outcome variable

method

one of 'boxplot' (default) or 'denseplot'

adjustment

adjust parameter for ggplot2::geom_density

title

title string for plot

Examples

1
2
3
4
5
# Define outcome and exposure column
outcome <- "Uncertain_Low_Back_Pain"
exposure <- "treatment"
# Plot outcome among different exposures
comparative.plot(simpatdat, exposure = exposure, outcome = outcome)

thogaertner/cinof1 documentation built on Jan. 8, 2022, 10:37 a.m.