Learn R Programming

manymome (version 0.2.3)

data_mod_cat: Sample Dataset: Moderation with One Categorical Moderator

Description

A moderation model with a categorical moderator.

Usage

data_mod_cat

Arguments

Format

A data frame with 300 rows and 5 variables:

x

Predictor. Numeric.

w

Moderator. String. Values: "group1", "group2", "group3"

y

Outcome variable. Numeric.

c1

Control variable. Numeric.

c2

Control variable. Numeric.

Examples

Run this code
data(data_mod_cat)
dat <- data_mod_cat
summary(lm_y <- lm(y ~ x*w + c1 + c2, dat))

Run the code above in your browser using DataLab