iiaplot_2: Illustrated regression line

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_2(fixef = list(b_0 = 0.5, b_2 = 1), range = c(0, 10),
  label = c("covariate", "outcome"))

Arguments

fixef

list of four coefficients b_0 and b_2, see Details

range

a vector of two values c(xmin, xmax)

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 b_2 is the slope of 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 intercept as vertical bar and slope parameters as triangles.

groups

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

Author(s)

Martin Schmettow

Examples

1
iiaplot_4(fixef(b_0 = -2, b_2 = 1.5))

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