plot_glsmr: Plot functions for glsmr objects

View source: R/plot_glsmr.R

plot_glsmrR Documentation

Plot functions for glsmr objects

Description

This function makes a few useful plots for glsmr objects

Usage

plot_glsmr(
  glsmr_obj,
  add_strata_2_curves = FALSE,
  add_strata_2_points = FALSE,
  brewer_col = "Set1",
  old_plot_scheme = FALSE,
  old_GAM_smooths = FALSE,
  plot_obs_res_betas = FALSE,
  pval_thresh = 0.05
)

Arguments

glsmr_obj

a glsmr object from the function glsmr()

add_strata_2_curves

binary TRUE or FALSE if strata boundaries should be illustrated to curve plots

add_strata_2_points

binary TRUE or FALSE if strata boundaries should be illustrated to dot plots

brewer_col

a brewer.pal color palette string

old_plot_scheme

set to TRUE to get an older version of the plot

old_GAM_smooths

binary TRUE or FALSE. The Default is FALSE. If TRUE the linear and GAM smooths will be derived from the complete data set and the geom_smooth() function of ggplot2, not from predicted values derived from the fitted models.

plot_obs_res_betas

set to TRUE to plot GAM residualized effect estimates for observational data

pval_thresh

The pvalue threshold to use to indicate which point estimates indicate an association between exposure and outcome. The default value is 0.05.

Value

ggplot figure

Examples

plot_glsmr()

hughesevoanth/glsmr documentation built on May 14, 2023, 3:41 p.m.