probeInteraction {MDMA}R Documentation

Probe interaction models

Description

Probe the effect of a moderator on an X/antecedent variable in a linear model.

[Stable]

Usage

probeInteraction(
  object,
  antecedent,
  moderator,
  alpha = 0.05,
  JN = TRUE,
  n.interval.moderator,
  quantile.moderator,
  values.moderator
)

Arguments

object

object of class lm.

antecedent

antecedent (or x) variable in object.

moderator

moderator variable in object.

alpha

desired alpha level for Johnson-Neyman procedure.

JN

indicate whether Johnson-Neyman procedure should be carried out.

n.interval.moderator

number of intervals in the moderator variable to probe.

quantile.moderator

quantile values in the moderator variable to probe.

values.moderator

raw values in the moderator variable to probe.

Details

the arguments n.interval.moderator, quantile.moderator and values.moderator can be combined. All unique values from these methods combined, together with the values from the Johnson-Neyman procedure (if specified) will be part of the probing procedure.

Value

probeInteraction returns a data frame containing values of the moderator in a linear model, the effect of the antecedent at that value of the moderator, standard errors, t values, p values and a confidence interval.

Author(s)

Mathijs Deen

Examples

lm.1 <- lm(mpg ~ hp * wt, data = mtcars)
probeInteraction(lm.1, hp, wt, JN=TRUE, n.interval.moderator = 3,
                 quantile.moderator = c(0.1,0.9), values.moderator = 2)

[Package MDMA version 1.1.0 Index]