% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/wrappers.R
\name{dpmix.causal}
\alias{dpmix.causal}
\title{Fit a causal two-arm Dirichlet process mixture without a GPD tail}
\usage{
dpmix.causal(
  y = NULL,
  X = NULL,
  treat = NULL,
  data = NULL,
  mcmc = list(),
  formula = NULL,
  ...
)
}
\arguments{
\item{y}{Either a response vector or a causal bundle object.}

\item{X}{Optional design matrix/data.frame.}

\item{treat}{Binary treatment indicator.}

\item{data}{Optional data.frame used with \code{formula}.}

\item{mcmc}{Named list of run arguments passed to \code{mcmc()} (including
optional performance controls such as \code{parallel_arms},
\code{workers}, \code{timing}, and \code{z_update_every}).}

\item{formula}{Optional formula.}

\item{...}{Additional build arguments passed to \code{\link{build_causal_bundle}}.}
}
\value{
A fitted object of class \code{"causalmixgpd_causal_fit"}.
}
\description{
\code{dpmix.causal()} fits a causal model with separate treated and control
outcome mixtures and, when requested, a propensity score block. It is the
bulk-only companion to \code{\link{dpmgpd.causal}}.
}
\details{
The resulting fit supports conditional outcome prediction
\eqn{F_a(y \mid x)} for \eqn{a \in \{0,1\}}, followed by causal
functionals such as \code{\link{ate}}, \code{\link{qte}},
\code{\link{cate}}, and \code{\link{cqte}}.
}
\examples{
\donttest{
N <- 30
X <- data.frame(x1 = stats::rnorm(N), x2 = stats::runif(N))
A <- stats::rbinom(N, 1, 0.5)
y <- abs(stats::rnorm(N) + A + 0.5 * X$x1) + 0.1
mcmc_small <- list(niter = 100, nburnin = 50, thin = 1, nchains = 1, seed = 1)

fit <- dpmix.causal(
  y = y, X = X, treat = A,
  backend = "sb", kernel = "normal",
  components = 3, mcmc = mcmc_small
)
summary(fit)
ate(fit, show_progress = FALSE)
}
}
\seealso{
\code{\link{build_causal_bundle}},
\code{\link{bundle}}, \code{\link{dpmgpd.causal}},
\code{\link{predict.causalmixgpd_causal_fit}}, \code{\link{ate}},
\code{\link{qte}}.
}
