% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/estpw_s5_alp.R
\name{alp_build}
\alias{alp_build}
\title{Build pseudo-weights using the ALP method}
\usage{
alp_build(
  vars,
  sc,
  sp,
  sp_des,
  wts.col,
  control,
  verbose = FALSE,
  log_messages = NULL
)
}
\arguments{
\item{vars}{Character vector of predictor variable names.}

\item{sc}{Data frame. The nonprobability sample.}

\item{sp}{Data frame. The probability reference sample.}

\item{sp_des}{A `survey.design2` or `svyrep.design` object for `sp`.}

\item{wts.col}{Character scalar. Name of the survey-weight column in `sp`.}

\item{control}{A list created by `pw_solver_control()`.}

\item{verbose}{Logical. If `TRUE`, convergence messages are printed.}

\item{log_messages}{Character vector of messages accumulated in earlier
steps, appended to the returned object unchanged.}
}
\value{
A list with components:
  \item{weights}{Numeric vector of ALP pseudo-weights for `sc`.}
  \item{coefficients}{Named numeric vector of participation model coefficients.}
  \item{solver_diagnostics}{List of solver convergence diagnostics.}
  \item{log_messages}{Updated character vector of log messages.}
  \item{internal}{List containing design matrices (`Xc`, `Xp`), fitted
    participation probabilities (`p_sc`, `p_sp`), and sandwich components
    (`S_beta`, `D`) needed by the estimation stage.}
}
\description{
Build pseudo-weights using the ALP method
}
\keyword{internal}
