\name{inter_design}
\alias{inter_design}
\alias{print.inter_design}
\alias{census_margins}
\alias{print.census_margins}
\title{Declare Survey Design Information and Census Margins}
\usage{
inter_design(data, weights, area, strata = NULL, psu = NULL,
  replicate_weights = NULL)

census_margins(margins, count = "Freq", structural_zeros = NULL,
  tolerance = 1e-8, reconcile = FALSE)

\method{print}{inter_design}(x, ...)

\method{print}{census_margins}(x, ...)
}
\arguments{
\item{data}{Survey microdata.}
\item{weights}{Name of the survey-weight column.}
\item{area}{Name of the geographic-area column.}
\item{strata}{Optional stratum-column name.}
\item{psu}{Optional primary-sampling-unit column name.}
\item{replicate_weights}{Optional character vector naming replicate-weight columns.}
\item{margins}{A census table or named list of census tables.}
\item{count}{Common name of the population-count column.}
\item{structural_zeros}{Optional data frame of impossible category combinations.
Missing values act as wildcards.}
\item{tolerance}{Relative tolerance for equality of census-table totals.}
\item{reconcile}{Whether inconsistent table totals may be proportionally rescaled.}
\item{x}{Object to print.}
\item{...}{Unused.}
}
\value{
\code{inter_design()} returns an object of class \code{inter_design}.
\code{census_margins()} returns an object of class \code{census_margins}.
}
\description{
Validate the two inputs required by \code{fit_inter_sae()}. Column names are
supplied as strings to keep programmatic workflows unambiguous.
}
\examples{
example_data <- inter_example()
design <- inter_design(example_data$survey, weights = "weight",
  area = "area", strata = "strata", psu = "psu")
margins <- census_margins(example_data$margins)
design
margins
}
