% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/estpw_s6_sc_update.R
\name{reconstruct_sc_output}
\alias{reconstruct_sc_output}
\title{Reconstruct the sample data frame with fitted pseudo-weights}
\usage{
reconstruct_sc_output(sc0, w_fit, keep_sc, na_mode, na_action_obj, sc_wname)
}
\arguments{
\item{sc0}{The original sample data frame (before any NA removal).}

\item{w_fit}{Numeric vector of fitted pseudo-weights, one per kept row.}

\item{keep_sc}{Logical vector identifying which rows of `sc0` were retained
for fitting.}

\item{na_mode}{Character string; one of `"omit"`, `"exclude"`,
`"fail"`, or `"pass"`.}

\item{na_action_obj}{The `na.action` attribute produced during NA
removal, or NULL.}

\item{sc_wname}{Name of the column in which pseudo-weights will be stored.}
}
\value{
A data frame derived from `sc0` with a pseudo-weight column
  named `sc_wname`.
}
\description{
Inserts the fitted pseudo-weights `w_fit` back into the original sample
data frame `sc0`, using the NA handling strategy used during
estimation. For `"omit"`, only the rows that were kept are returned.
For `"exclude"`, all original rows are returned with NA weights
for rows that were dropped. For `"fail"` or `"pass"`, all rows
are assumed to be present and weights are attached directly.
}
\keyword{internal}
