% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/causal.R
\name{qtt}
\alias{qtt}
\title{Quantile treatment effects standardized to treated covariates}
\usage{
qtt(
  fit,
  probs = c(0.1, 0.5, 0.9),
  newdata = NULL,
  y = NULL,
  interval = "credible",
  level = 0.95,
  show_progress = TRUE
)
}
\arguments{
\item{fit}{A \code{"causalmixgpd_causal_fit"} object from \code{run_mcmc_causal()}.}

\item{probs}{Numeric vector of probabilities in (0, 1) specifying the quantile levels
of the outcome distribution to estimate treatment effects at.}

\item{newdata}{Ignored for marginal estimands. If supplied, a warning is issued
and training data are used.}

\item{y}{Ignored for marginal estimands. If supplied, a warning is issued
and training data are used.}

\item{interval}{Character or NULL; type of credible interval:
\itemize{
\item \code{NULL}: no interval
\item \code{"credible"} (default): equal-tailed quantile intervals
\item \code{"hpd"}: highest posterior density intervals
}}

\item{level}{Numeric credible level for intervals (default 0.95 for 95 percent CI).}

\item{show_progress}{Logical; if TRUE, print step messages and render progress where supported.}
}
\value{
An object of class \code{"causalmixgpd_qte"} containing the QTT
summary, the probability grid, and the arm-specific predictive objects used
in the aggregation. The returned object includes a top-level
\code{$fit_df} data frame for direct extraction.
}
\description{
\code{qtt()} computes the quantile treatment effect on the treated.
}
\details{
The estimand is
\deqn{\mathrm{QTT}(\tau) = Q_1^{t}(\tau) - Q_0^{t}(\tau),}
where marginalization is over the empirical covariate distribution of the
treated units only.
}
\examples{
\donttest{
N <- 25
X <- data.frame(x1 = stats::rnorm(N))
A <- stats::rbinom(N, 1, 0.5)
y <- abs(stats::rnorm(N)) + 0.1
mcmc_small <- list(niter = 100, nburnin = 50, thin = 1, nchains = 1, seed = 1)
cb <- build_causal_bundle(y = y, X = X, A = A, backend = "sb", kernel = "normal",
                         components = 3, mcmc_outcome = mcmc_small, mcmc_ps = mcmc_small)
fit <- run_mcmc_causal(cb, show_progress = FALSE)
qtt(fit, probs = c(0.5, 0.9))
}
}
\seealso{
\code{\link{qte}}, \code{\link{cqte}}, \code{\link{att}}.
}
