% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/propensity.R
\name{wf_target_propensity}
\alias{wf_target_propensity}
\title{Build a propensity target: stacked reference frame and membership model spec.}
\usage{
wf_target_propensity(
  online,
  reference,
  formula,
  method = c("logit", "rf", "gbm"),
  by = NULL,
  id = NULL
)
}
\arguments{
\item{online}{Data frame: the self-selected (non-probability) sample.}

\item{reference}{Data frame: the probability reference sample.}

\item{formula}{Two-sided membership formula, e.g. \code{member ~ age + edu}. The
right-hand side names the model predictors; the left-hand side names the
membership indicator the constructor creates (\code{1} online, \code{0} reference).}

\item{method}{Fit backend. Only \code{"logit"} is executable in this release;
\code{"rf"} / \code{"gbm"} are reserved and abort in \code{\link[=wf_propensity]{wf_propensity()}}.}

\item{by}{Optional grouping column present in both frames; the propensity
model is fit within each group.}

\item{id}{Optional id column in \code{online}; when \code{NULL}, online units are
identified by row order.}
}
\value{
A \code{wf_target_propensity} object.
}
\description{
Stacks a self-selected \code{online} sample and a probability \code{reference} sample
into one frame with a membership indicator, so the online sample's selection
propensity can be modelled. No model is fit here; execution happens in
\code{\link[=wf_propensity]{wf_propensity()}}.
}
