iiaplot_4: Illustrated interaction plot 4

Description Usage Arguments Author(s) Examples

View source: R/betaplot.R

Description

plots a diagram for a linear model with one dichtotomous group and a metric predictor

Usage

1
2
iiaplot_4(fixef = list(b_0 = 0, b_1 = -8, b_2 = 1, b_3 = 2), range = c(0,
  10), groups = c("A", "B"), label = c("covariate", "outcome"))

Arguments

fixef

list of four coefficients b_0 - b_3, see Details

range

a vector of two values c(xmin, xmax)

groups

a vector of two strings, like c("A", "B")

label

vector of strings ("covariate", "outcome")

This function plots a standard interaction diagram for a model with one covariate and two groups. This model has the following parameters:

b_0 is the intercept, the expected value of the reference group, i.e. the first element in argument groups ("A"). b_1 is the grand difference towards the second group (b_2 = 0) b_2 is the slope of reference group b_3 is the interaction effect, which is the difference in slope towards the reference group

The parameters can also be given as an unnamed list, as long as the elements comply to the order.

The line plot is augmented with illustrations, showing the two group effects b_0 and b_1 as vertical bars and the slope parameters as triangles.

Author(s)

Martin Schmettow

Examples

1
iiaplot_1(fixef(b_0 = -2, b_1 = 1, b_2 = 1.5, b_3 = 1))

schmettow/betaplot documentation built on May 29, 2019, 3:41 p.m.