graphMod: Graph a Moderation Effect

Description Usage Arguments Details

View source: R/graphMod.R

Description

Graph a Moderation Effect

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
graphMod(
  data,
  x,
  y,
  mod,
  highMod,
  lowMod,
  int,
  slp,
  hlab = "High",
  llab = "Low"
)

Arguments

data

the data.

x

the x variable given as data$x.

y

the y variable given as data$y.

mod

the moderator given as data$mod.

highMod

the model ran with HIGH_mod (can be gls or lme objects).

lowMod

the model ran with LOW_mod (can be gls or lme objects).

int

coefficient position of the y-intercept.

slp

coefficient position of the slope of x.

hlab

text label for "high" level of moderator.

llab

text label for "low" level of moderator.

Details

This is function only works for numerical-numerical interactions. It returns a ggplot object.


RandiLGarcia/dyadr documentation built on March 23, 2021, 3:33 a.m.