Learn R Programming

manymome (version 0.3.7)

data_mod_cat_2w: Sample Dataset: Two Categorical Moderators

Description

A two-moderator model, both categorical.

Usage

data_mod_cat_2w

Arguments

Format

A data frame with 600 rows and 6 variables:

y

Outcome variable. Numeric.

x

Predictor. Numeric.

gp

Moderator 1. String: "Control" and "Treatment".

site

Moderator 2. String: "Site 1", "Site 2", and "Site 3".

c1

Control variable. Numeric.

c2

Control variable. Numeric.

Examples

Run this code
data(data_mod_cat_2w)
lm_out <- lm(y ~ x*gp + x*site + c1 + c2, data_mod_cat_2w)
out <- cond_effects(
  wlevels = c("site", "gp"),
  x = "x",
  fit = lm_out
)
out
plot(out, facet_grid_cols = "site", graph_type = "tumble")

Run the code above in your browser using DataLab