\name{benchmark_inter}
\alias{benchmark_inter}
\title{Benchmark Domain Estimates to an Official Aggregate}
\usage{
benchmark_inter(estimates, target, weight = "population",
  method = c("logit", "ratio", "additive"), lower = 0, upper = 1)
}
\arguments{
\item{estimates}{A fitted \code{inter_sae} object or estimate data frame.}
\item{target}{Official weighted mean or proportion.}
\item{weight}{Benchmarking-weight column.}
\item{method}{Logit, ratio, or additive adjustment.}
\item{lower,upper}{Range for bounded logit adjustment.}
}
\value{A data frame with original and benchmarked estimates.}
\description{
Apply a common adjustment while reproducing an official population-weighted
aggregate. Logit adjustment preserves a bounded response range.
}
\examples{
example_data <- inter_example()
design <- inter_design(example_data$survey, "weight", "area")
margins <- census_margins(example_data$margins)
fit <- fit_inter_sae(unemployed ~ sex + age + residence + area,
  design, margins, family = "binomial")
official <- with(example_data$survey,
  weighted.mean(unemployed, weight))
benchmarked <- benchmark_inter(fit, official)
attr(benchmarked, "benchmark_achieved")
}
