graph_all_effects: Graph all of the effects in a model that meet a significance...

View source: R/graph_effects.R

graph_all_effectsR Documentation

Graph all of the effects in a model that meet a significance threshold.

Description

This function is intended to quickly view and model output (e.g. interactions). All factor variables should be given contrasts.

Usage

graph_all_effects(
  m,
  p_threshold = 0.05,
  x_pref = NULL,
  fill_pref = NULL,
  facet_pref = NULL,
  continuous_x = FALSE,
  colors = NULL
)

Arguments

m

A linear model. Standard OLS or logistic regression will work.

p_threshold

All p values less than or equal to this threshold will be graphed.

x_pref

An optional vector of preferences for the x axis.

fill_pref

An optional vector of preferences for the fill of the graph.

facet_pref

An optional vector of preferences for the facets of the graph.

continuous_x

If true, a line graph will be created for any continuous variables, rather than bar graphs with predicted values at +1/-1 SD.

colors

An optional vector of colors for the bars and lines of graphs.

Value

A set of ggplot graphs.


michaelasher/asherR documentation built on July 5, 2023, 8:55 p.m.