% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/prepare_ebmed_data.R
\name{prepare_ebmed_data}
\alias{prepare_ebmed_data}
\title{Prepare Data for buzzMed Model}
\usage{
prepare_ebmed_data(dataset, X, M, Y, M_cont, Y_cont)
}
\arguments{
\item{dataset}{A \code{data.frame} containing outcome, predictor, and
mediator variables.}

\item{X}{Character vector naming the predictor variable(s).}

\item{M}{Character vector naming mediator variables.}

\item{Y}{Character string naming the outcome variable.}

\item{M_cont}{Logical. Should \eqn{M} be treated as continuous?}

\item{Y_cont}{Logical. Should \eqn{Y} be treated as continuous?}
}
\value{
A \code{list} containing:
\describe{
  \item{\code{N}}{Integer. The number of observations (rows).}
  \item{\code{X}}{Numeric matrix of predictors.}
  \item{\code{y}}{Numeric vector (or binary 0/1 vector) of the outcome.}
  \item{\code{m1, m2, ...}}{Individual numeric vectors for each mediator.}
}
}
\description{
This internal helper extracts the predictor(s), mediators, and outcome
from the dataset, handles matrix conversions for the predictors, and
creates a named list of mediators (\code{m1, m2, ... mk}) to match the
indexing used in the generated JAGS model strings.
}
\details{
Converts a user-supplied data frame into the specific list format required
by the Bayesian mediation JAGS models.


Predictors are converted to a matrix to allow for multivariate \eqn{X}
(e.g., when including covariates). Mediators are split into individual
list elements to simplify the JAGS \code{for} loops.
}
\keyword{internal}
