% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/propensity.R
\name{wf_propensity}
\alias{wf_propensity}
\title{Correct a non-probability sample by inverse-propensity pseudo-weighting.}
\usage{
wf_propensity(
  target,
  weight = c("ipw", "kernel", "matching"),
  stabilize = TRUE,
  trim = NULL
)
}
\arguments{
\item{target}{A \code{wf_target_propensity} object.}

\item{weight}{Pseudo-weight form. Only \code{"ipw"} is executable in this release;
\code{"kernel"} / \code{"matching"} are reserved.}

\item{stabilize}{Use stabilized IPW (\code{pi_bar / phat}) to tame extreme weights.}

\item{trim}{Optional positive scalar: clamp weights above \code{trim * median(w)}.}
}
\value{
A \code{wf_propensity_weights} object inheriting from \code{wf_weights}, with
\verb{$overlap} and \verb{$balance} diagnostics.
}
\description{
Fits the membership model declared in a \code{\link[=wf_target_propensity]{wf_target_propensity()}} object and
converts each online unit's fitted membership probability into a pseudo-design
weight. The result is a \code{wf_weights} object suitable as an \code{init_weight} for
\code{\link[=wf_rake]{wf_rake()}} / \code{\link[=wf_poststrat]{wf_poststrat()}} and as a stage in \code{\link[=wf_compose]{wf_compose()}}.
}
