% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/statMatchLCM.R
\name{smc_step1}
\alias{smc_step1}
\title{SMC step 1: selection of best imputed dataset}
\usage{
smc_step1(datA, datB, output_ll)
}
\arguments{
\item{datA}{data.frame A}

\item{datB}{data.frame B}

\item{output_ll}{list with imputed datasets (impdata)}
}
\value{
A list with imputed datasets:
\describe{
\item{datAB_imp1}{The full imputed dataset obtained after combining A and B.}
\item{datA_imp1}{Subset of \code{datAB_imp1} corresponding to dataset A.}
\item{datB_imp1}{Subset of \code{datAB_imp1} corresponding to dataset B.}
}
}
\description{
Identifies and selects the imputed dataset that
minimizes the Hellinger distance between the reference and synthetic distributions,
thereby achieving the highest level of distributional similarity and
improving the statistical consistency of the imputation.
}
\examples{
if (requireNamespace("NPBayesImputeCat", quietly = TRUE)) {
  data(datA)
  data(datB)

  datAB <- datAB_to_SM(datA, datB)

  # call DPMPM (reduced settings for speed)
  output_list <- NPBayesImputeCat::DPMPM_nozeros_imp(
    X = datAB,
    nrun = 50,
    burn = 10,
    thin = 10,
    K = 20,
    aalpha = 0.25,
    balpha = 0.25,
    m = 2,
    seed = 1234,
    silent = TRUE
  )

  step_first <- smc_step1(datA, datB, output_list)
  str(step_first$datA_imp1)
  str(step_first$datB_imp1)
}
}
\references{
\itemize{
\item Lewaa, I., Hafez, M. S., Ismail, M. A. (2023).
\emph{Mixed Statistical Matching Approaches Using a Latent Class Model: Simulation Studies}.
Journal of Statistics Applications  Probability, 12(1), 247--265.

\item D'Orazio, M., Di Zio, M., and Scanu, M. (2006).
\emph{Statistical Matching: Theory and Practice}.
John Wiley and Sons.

\item D'Orazio, M., Di~Zio, M., and Scanu, M. (2019).
Auxiliary variable selection in a statistical matching problem.

\item Zhang, L.-C., and Chambers, R.
Analysis of integrated data.
CRC/Chapman and Hall, pp. 101--120.

\item Conti, P. L., Marella, D., and Scanu, M. (2016).
Statistical matching analysis for complex survey data with applications.
\emph{Journal of the American Statistical Association}, 111(516), 1715--1725.
}
}
