% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/statMatchLCM.R
\name{smc2_step2}
\alias{smc2_step2}
\title{SMC2 – Hot deck on fitted multinomial probabilities}
\usage{
smc2_step2(step1)
}
\arguments{
\item{step1}{output from \code{smc_step1()}}
}
\value{
A list with:
\describe{
\item{datA_fused_2}{A data frame containing the final fused (imputed) version of dataset A.}
\item{out_nndd}{A list with results from the nearest-neighbour distance matching procedure.}
\item{model_form}{A formula object used to fit the models.}
\item{FitteddatA_imp1}{A data frame of fitted values obtained from the model for dataset A.}
\item{FitteddatB_imp1}{A data frame of fitted values obtained from the model for dataset B.}
}
}
\description{
Implements a model-based hot deck data fusion approach by estimating multinomial models on both datasets
and matching observations based on their fitted probability distributions
}
\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)
  step_second <- smc2_step2(step_first)

  result <- step_second$datA_fused_2
  result
}
}
\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.
}
}
