% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/build_ebmed_model_mcont_ycont.R
\name{build_ebmed_model_mcont_ycont}
\alias{build_ebmed_model_mcont_ycont}
\title{Build JAGS Model String (Continuous M & Continuous Y)}
\usage{
build_ebmed_model_mcont_ycont(P, K, parms)
}
\arguments{
\item{P}{Integer. The number of predictors/covariates.}

\item{K}{Integer. The number of mediators.}

\item{parms}{A \code{data.frame} generated by \code{\link{make_parms_main}}
containing columns: \code{priors}, \code{distribution}, \code{arguments},
and \code{template}.}
}
\value{
A character string containing the full JAGS model specification.
}
\description{
This internal function dynamically generates a JAGS model string based on
the number of predictors (\eqn{P}), mediators (\eqn{K}), and the prior
distributions defined in the \code{parms} object. It handles the
multivariate \eqn{a}-paths and \eqn{b}-paths using \code{inprod} (inner
product) for efficiency in JAGS.
}
\details{
Constructs the JAGS model specification for a Bayesian mediation model
where both mediators and outcome are continuous, incorporating spike-and-slab
variable selection.


The model structure follows a standard mediation framework:
\itemize{
  \item \strong{Mediator Models:} Each mediator \eqn{M_k} is modeled as a
  linear combination of predictors \eqn{X}.
  \item \strong{Outcome Model:} \eqn{Y} is modeled as a linear combination
  of predictors \eqn{X} (direct effects) and mediators \eqn{M} (indirect effects).
  \item \strong{Variable Selection:} Uses Bernoulli-distributed indicators
  (\code{a.pip} and \code{b.pip}) to implement spike-and-slab priors on
  the mediation pathways.
}

Joint inclusion for a specific mediator pathway is calculated internally
as \code{ind.joint <- a.pip * b.pip}.
}
\seealso{
\code{\link{prepare_ebmed_data}}, \code{\link{define_init_values}},
\code{\link{buzzEBMcontMcontY}}
}
\keyword{internal}
