% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/interoperability.R
\name{as_svydesign}
\alias{as_svydesign}
\title{Convert WFC weights to a survey design}
\usage{
as_svydesign(
  w,
  data,
  id = "id",
  ids = ~1,
  strata = NULL,
  fpc = NULL,
  nest = FALSE,
  ...
)
}
\arguments{
\item{w}{A \code{wf_weights} object.}

\item{data}{Non-empty analysis data frame containing the units in \code{w}.}

\item{id}{Unit-ID column in \code{data}; matched to \code{w$data$id}.}

\item{ids}{Survey cluster formula, defaulting to independent units.}

\item{strata}{Optional survey strata formula.}

\item{fpc}{Optional finite-population-correction formula.}

\item{nest}{Whether cluster IDs should be relabeled to nest within strata.}

\item{...}{Additional arguments passed to \code{survey::svydesign()}. WFC owns
\code{weights} and \code{probs}; they cannot be overridden.}
}
\value{
A standard \code{survey.design2} object whose variables include the
aligned \code{.wf_weight} column.
}
\description{
Joins calibrated WFC weights onto an analysis data frame by exact unit ID and
creates a standard \code{survey::svydesign()} object. The \code{survey} package remains
a suggested dependency.
}
