R/simdat.R

#' A simulated dataset with moderator
#'
#' This simulated dataset contains a hypothetical moderating variable that is dichotomously coded.
#' The true model dictated that the moderator moderated both a and b paths of the mediational model,
#' though the strength of moderation may be small.
#'
#' @format A data frame with 800 observations (from 50 subjects) and 5 variables
#' \describe{
#'   \item{L2id}{Level 2 or subject ID}
#'   \item{X}{Predictor}
#'   \item{M}{Mediator}
#'   \item{Y}{Outcome}
#'   \item{mod}{Moderator}
#' }
"simdat"

Try the multilevelmediation package in your browser

Any scripts or data that you put into this service are public.

multilevelmediation documentation built on April 4, 2025, 4:33 a.m.