% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/core-classes.R
\name{survey_nonprob}
\alias{survey_nonprob}
\title{Calibrated / Non-Probability Survey Design}
\usage{
survey_nonprob(
  data = data.frame(),
  metadata = survey_metadata(),
  variables = list(),
  groups = character(0),
  call = NULL,
  calibration = NULL
)
}
\arguments{
\item{data}{A \code{data.frame} containing the survey data. Prefer
\code{\link[=as_survey_nonprob]{as_survey_nonprob()}} over calling this constructor directly.}

\item{metadata}{A \link{survey_metadata} object. Created automatically by
\code{\link[=as_survey_nonprob]{as_survey_nonprob()}}.}

\item{variables}{A named list of design specification (\code{weights},
\code{probs_provided}). Set automatically by \code{\link[=as_survey_nonprob]{as_survey_nonprob()}}.}

\item{groups}{Set by surveytidy's \code{group_by()}. Always \code{character(0)} in
standalone surveycore use.}

\item{call}{Language object capturing the construction call.}

\item{calibration}{The calibration provenance object returned by a
\pkg{surveywts} calibration function (e.g., \code{surveywts::rake()}),
or \code{NULL} if calibration was performed externally. Stores the
calibration targets, variables, and trimming parameters for
reproducibility and future bootstrap re-calibration. Default \code{NULL}.}
}
\value{
A \code{survey_nonprob} object.
}
\description{
A survey design object for non-probability samples and post-hoc calibrated
designs (e.g., raked online panels, post-stratified samples). Create with
\code{\link[=as_survey_nonprob]{as_survey_nonprob()}}.
}
\section{Phase 2.5 skeleton}{

This class is a \strong{skeleton} added in Phase 0 to reserve its place in the
class hierarchy. The constructor \code{\link[=as_survey_nonprob]{as_survey_nonprob()}} accepts
pre-computed calibration weights and stores calibration provenance from
\pkg{surveywts} output.

Full functionality — including bootstrap variance with re-calibration on
each replicate — will be implemented in Phase 2.5 alongside the
\pkg{surveywts} package. Until then, estimation uses SRS-based variance
(same assumption as \code{\link[=as_survey]{as_survey()}} with weights only).
}

\section{Non-probability samples}{

Unlike \code{\link[=as_survey]{as_survey()}}, \code{\link[=as_survey_replicate]{as_survey_replicate()}}, and \code{\link[=as_survey_twophase]{as_survey_twophase()}},
this
class does \strong{not} assume a probability sampling design. Standard errors
produced from a \code{survey_nonprob} object rest on a model-assisted SRS
assumption, which is consistent with common practice for calibrated
non-probability samples (e.g., raked online panels). See
\code{vignette("creating-survey-objects")} for guidance on when this is
appropriate and what the limitations are.
}

\section{Design variables (\verb{@variables})}{

\describe{
\item{\code{weights}}{Character string naming the (calibrated) weight column.}
\item{\code{probs_provided}}{Always \code{FALSE} for calibrated designs.}
}
}

\section{Calibration provenance (\verb{@calibration})}{

When calibration is performed via \pkg{surveywts}, the returned calibration
object is stored here. It contains the calibration targets, variables used,
trimming cap, effective sample size before and after, and design effect.
\code{NULL} when calibration was performed externally (e.g., via \code{anesrake}).
}

\seealso{
\code{\link[=as_survey_nonprob]{as_survey_nonprob()}} to create a \code{survey_nonprob} object.

Other constructors: 
\code{\link{as_survey}()},
\code{\link{as_survey_nonprob}()},
\code{\link{as_survey_replicate}()},
\code{\link{as_survey_twophase}()},
\code{\link{survey_data}()},
\code{\link{survey_glm}()},
\code{\link{survey_glm_fit}()},
\code{\link{survey_replicate}()},
\code{\link{survey_taylor}()},
\code{\link{survey_twophase}()}
}
\concept{constructors}
\keyword{internal}
