% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/estpw_s7_finalize_output.R
\name{finalize_pw_fit}
\alias{finalize_pw_fit}
\title{Finalize and assemble the `pw_fit` return object}
\usage{
finalize_pw_fit(result, sc_out, sc0, sc_wname, na_mode, keep_sc, na_action_obj)
}
\arguments{
\item{result}{A list accumulating outputs from the estimation pipeline.}

\item{sc_out}{The reconstructed sample data frame produced by
`reconstruct_sc_output()`.}

\item{sc0}{The original (pre-NA-removal) sample data frame, stored for
diagnostic access via `result$internal$raw_sc`.}

\item{sc_wname}{Name of the pseudo-weight column in `sc_out`.}

\item{na_mode}{Character string describing how NAs were handled; stored in
`result$internal$na`.}

\item{keep_sc}{Logical vector of retained rows; stored in
`result$internal$na`.}

\item{na_action_obj}{The `na.action` attribute from NA removal; stored
in `result$internal$na`.}
}
\value{
`result` with `sc_updated`, `pseudo_weights`, and
  `internal` fields populated, and class set to `"pw_fit"`.
}
\description{
Attaches the reconstructed sample data frame, the pseudo-weight vector, and
NA-handling metadata to `result`, then assigns the `"pw_fit"`
class so that downstream S3 methods can dispatch on it.
}
\keyword{internal}
