data_mod_2x1w: Sample Dataset: One Moderator on Two Predictors

data_mod_2x1wR Documentation

Sample Dataset: One Moderator on Two Predictors

Description

A one-moderator model, with a moderator affecting the effects of two predictors.

Usage

data_mod_2x1w

Format

A data frame with 200 rows and 6 variables:

y

Outcome variable. Numeric.

x1

Predictor. Numeric.

x2

Predictor. Numeric.

w

Moderator. Numeric.

c1

Control variable. Numeric.

c2

Control variable. Numeric.

Examples

library(lavaan)
data(data_mod_2x1w)
lm_out <- lm(y ~ x1*w + x2*w + c1 + c2, data_mod_2x1w)
out1 <- cond_effects(
  wlevels = "w",
  x = "x1",
  fit = lm_out
)
out1
plot(out1, graph_type = "tumble")

out2 <- cond_effects(
  wlevels = "w",
  x = "x2",
  fit = lm_out
)
out2
plot(out2, graph_type = "tumble")

manymome documentation built on Sept. 3, 2026, 9:08 a.m.