% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/feature_pos.R
\name{assess_pos}
\alias{assess_pos}
\title{PLS-POS: Prediction-Oriented Segmentation}
\usage{
assess_pos(
  seminr_model,
  K = 2,
  nstart = 10,
  max_iter = 100,
  search_depth = NULL,
  min_segment_size = NULL,
  seed = 123
)
}
\arguments{
\item{seminr_model}{An estimated SEMinR model from \code{estimate_pls()}.}

\item{K}{Integer >= 2. Number of segments to extract.}

\item{nstart}{Number of random starting partitions (default 10). The best
solution (highest objective) is returned.}

\item{max_iter}{Maximum hill-climbing iterations per start (default 100).}

\item{search_depth}{Maximum number of candidates to evaluate per iteration
before accepting the first improvement (default = N, the sample size).
Use a smaller value for faster but potentially less optimal results.}

\item{min_segment_size}{Minimum observations per segment. Default is
\code{max(10, max_predictors + 2)} where max_predictors is the largest
number of predictors for any endogenous construct.}

\item{seed}{Random seed for reproducibility.}
}
\value{
An S3 object of class \code{"pos_analysis"} with components:
  \describe{
    \item{K}{Number of segments}
    \item{segment_assignment}{Integer vector of segment assignments (length N)}
    \item{segment_sizes}{Named integer vector of segment sizes}
    \item{segment_models}{List of K re-estimated seminr model objects}
    \item{segment_rsquared}{Matrix of R-squared values (endogenous x K)}
    \item{segment_paths}{List of K path coefficient matrices}
    \item{objective}{Sum of R-squared (objective criterion)}
    \item{converged}{Whether the best start converged}
    \item{iterations}{Number of iterations in the best start}
    \item{nstart}{Number of random starts attempted}
    \item{all_objectives}{Objective values for all starts}
  }
}
\description{
Performs prediction-oriented segmentation (PLS-POS) to uncover unobserved
heterogeneity in PLS-SEM models. PLS-POS uses a deterministic hill-climbing
approach to maximize the sum of R-squared values across all endogenous
constructs across K segments (Becker et al., 2013).
}
\details{
Unlike FIMIX-PLS, PLS-POS makes no distributional assumptions and can
detect heterogeneity in both structural and (formative) measurement models.
}
\examples{
\donttest{
library(seminr)

mobi_mm <- constructs(
  composite("Image",        multi_items("IMAG", 1:5)),
  composite("Expectation",  multi_items("CUEX", 1:3)),
  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 = "Satisfaction"),
  paths(from = "Satisfaction", to = "Loyalty")
)
pls_model <- estimate_pls(data = mobi, measurement_model = mobi_mm,
                           structural_model = mobi_sm)

pos_result <- assess_pos(pls_model, K = 2, nstart = 2, max_iter = 10,
                          seed = 123)
print(pos_result)
summary(pos_result)
}

}
\references{
Becker, J.-M., Rai, A., Ringle, C. M., & Voelckner, F. (2013). Discovering
Unobserved Heterogeneity in Structural Equation Models to Avert Validity
Threats. \emph{MIS Quarterly}, 37(3), 665-694.
}
\seealso{
[assess_fimix()] for probabilistic (EM-based) segmentation
}
