% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/feature_fimix.R
\name{assess_fimix}
\alias{assess_fimix}
\title{FIMIX-PLS Analysis for PLS-SEM}
\usage{
assess_fimix(
  seminr_model,
  K = 2,
  nstart = 10,
  max_iter = 5000,
  stop_criterion = 1e-06,
  seed = 123
)
}
\arguments{
\item{seminr_model}{An estimated SEMinR model from \code{estimate_pls()}.}

\item{K}{Integer; the number of segments (default 2). Must be >= 2.}

\item{nstart}{Integer; number of random EM starts (default 10).}

\item{max_iter}{Integer; maximum EM iterations per start (default 5000).}

\item{stop_criterion}{Numeric; convergence threshold on log-likelihood
change (default 1e-6).}

\item{seed}{Random seed for reproducibility (default 123).}
}
\value{
An object of class \code{fimix_analysis} containing:
  \item{K}{Number of segments}
  \item{segment_proportions}{Named numeric vector of mixing proportions}
  \item{posterior}{N x K matrix of posterior segment probabilities}
  \item{segment_assignment}{Integer vector of hard assignments (argmax)}
  \item{segment_paths}{List of K path coefficient matrices}
  \item{segment_intercepts}{List of K intercept vectors}
  \item{segment_variances}{J x K matrix of residual variances}
  \item{log_likelihood}{Final log-likelihood}
  \item{n_parameters}{Number of free parameters}
  \item{info_criteria}{Named vector of information criteria}
  \item{converged}{Logical; whether EM converged}
  \item{iterations}{Number of EM iterations}
  \item{n_starts_completed}{Number of random starts completed}
  \item{pls_model}{The original estimated seminr model}
  \item{n_obs}{Sample size}
}
\description{
\code{assess_fimix} runs the FIMIX-PLS (Finite Mixture PLS) procedure to
identify unobserved heterogeneity in PLS-SEM structural models. The EM
algorithm probabilistically assigns observations to \code{K} latent
segments, each with segment-specific structural path coefficients.
}
\details{
FIMIX-PLS operates on construct scores from the estimated PLS model.
It fits a mixture of regressions to each structural equation simultaneously,
estimating segment-specific intercepts, path coefficients, and residual
variances. Multiple random starts (\code{nstart}) are used to avoid local
optima; the solution with the highest log-likelihood is retained.
}
\examples{
library(seminr)
library(seminrExtras)

mobi_mm <- constructs(
  composite("Image",        multi_items("IMAG", 1:5)),
  composite("Expectation",  multi_items("CUEX", 1:3)),
  composite("Value",        multi_items("PERV", 1:2)),
  composite("Satisfaction", multi_items("CUSA", 1:3)),
  composite("Loyalty",      multi_items("CUSL", 1:3))
)

mobi_sm <- relationships(
  paths(from = "Image",       to = c("Expectation", "Satisfaction", "Loyalty")),
  paths(from = "Expectation", to = c("Value", "Satisfaction")),
  paths(from = "Value",       to = "Satisfaction"),
  paths(from = "Satisfaction",to = "Loyalty")
)

mobi_pls <- estimate_pls(data = mobi,
                          measurement_model = mobi_mm,
                          structural_model  = mobi_sm)

\donttest{
fimix_result <- assess_fimix(mobi_pls, K = 2, nstart = 5, seed = 123)
print(fimix_result)
summary(fimix_result)
}

}
\references{
Hahn, C., Johnson, M. D., Herrmann, A., & Huber, F. (2002). Capturing
Customer Heterogeneity using a Finite Mixture PLS Approach. Schmalenbach
Business Review, 54, 243-269.

Sarstedt, M., Becker, J.-M., Ringle, C. M. & Schwaiger, M. (2011).
Uncovering and Treating Unobserved Heterogeneity with FIMIX-PLS: Which
Model Selection Criterion Provides an Appropriate Number of Segments?
Schmalenbach Business Review, 63(1), 34-62.
}
\seealso{
\code{\link{assess_fimix_compare}} for comparing multiple K values
}
