% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/build_ebmed_model_mcat_ycat.R
\name{build_ebmed_model_mcat_ycat}
\alias{build_ebmed_model_mcat_ycat}
\title{Build JAGS Model String (Binary M & Binary Y)}
\usage{
build_ebmed_model_mcat_ycat(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 generates a JAGS model string using logistic
regression (logit link) for both the mediator and outcome equations.
It incorporates spike-and-slab variable selection on all mediation pathways.
}
\details{
Constructs the JAGS model specification for a Bayesian mediation model
where both mediators and the outcome are binary (0/1).


The model structure for dual-binary data:
\itemize{
  \item \strong{Mediator Models:} \eqn{M_k \sim Bernoulli(p_{m_k})}, where
  \eqn{logit(p_{m_k})} is a linear combination of predictors \eqn{X}.
  \item \strong{Outcome Model:} \eqn{Y \sim Bernoulli(p_y)}, where
  \eqn{logit(p_y)} is a linear combination of direct effects (\eqn{X})
  and indirect effects (binary \eqn{M}).
  \item \strong{Variable Selection:} Bernoulli hyperpriors (\code{a.pip.hyperprior}
  and \code{b.pip.hyperprior}) govern the inclusion of each path.
}
}
\seealso{
\code{\link{buzzEBMcatMcatY}}, \code{\link{define_init_values}}
}
\keyword{internal}
