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

\item{datB}{data.frame B}

\item{datC}{data.frame C}

\item{output_ll}{list with imputed datasets (impdata)}
}
\value{
A list with imputed datasets:
\describe{
\item{datABC_imp1}{The full imputed dataset combining A, B, and C.}
\item{datA_imp1}{Subset of the imputed data corresponding to dataset A.}
\item{datB_imp1}{Subset corresponding to dataset B.}
\item{datC_imp1}{Subset corresponding to dataset C.}
}
}
\description{
Selects the imputed dataset minimizing the Hellinger distance
between the reference distribution from dataset A and the
synthetic distribution from dataset B, in a three-sample
statistical matching framework (A, B, C).
}
\examples{
if (requireNamespace("NPBayesImputeCat", quietly = TRUE)) {
  data(datA)
  data(datB)

  datAB <- datAB_to_SM(datA, datB)
  datC <- data.frame(
    X = datB$X[1:4],
    Y1 = datA$Y1[1:4],
    Z1 = datB$Z1[1:4]
  )

  # adding auxiliary information
  datABC <- rbind(datAB, datC)

  # call DPMPM
  output_list_AII <- NPBayesImputeCat::DPMPM_nozeros_imp(
    X = datABC, nrun = 500, burn = 50, thin = 50,
    K = 80, aalpha = 0.25, balpha = 0.25,
    m = 2, seed = 1234, silent = FALSE
  )

  step_first_aii <- sma_step1(datA, datB, datC, output_list_AII)
  names(step_first_aii)
}
}
\references{
\itemize{
\item Lewaa, I., Hafez, M. S., and Ismail, M. A. (2023).
\emph{Mixed Statistical Matching Approaches Using a Latent Class Model: Simulation Studies}.
Journal of Statistics Applications and 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.
}
}
