% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/feature_coa.R
\name{assess_coa}
\alias{assess_coa}
\title{Composite Overfit Analysis (COA)}
\usage{
assess_coa(
  seminr_model,
  focal_construct,
  deviance_bounds = c(0.025, 0.975),
  params = "path_coef",
  technique = predict_DA,
  noFolds = 10,
  reps = 1,
  cores = NULL,
  seed = 123,
  predict_model = NULL
)
}
\arguments{
\item{seminr_model}{An estimated SEMinR model from `estimate_pls()`.}

\item{focal_construct}{Name of the endogenous construct to analyze (character).}

\item{deviance_bounds}{Two-element numeric vector of quantile bounds for
identifying deviant cases (default `c(0.025, 0.975)`).}

\item{params}{Character vector of model parameters to assess for instability.
Valid values include `"path_coef"`, `"outer_weights"`, `"outer_loadings"`,
`"rSquared"` (default `"path_coef"`).}

\item{technique}{Prediction technique: `predict_DA` (default) or `predict_EA`.}

\item{noFolds}{Number of folds for k-fold cross-validation (default 10).}

\item{reps}{Number of CV repetitions (default 1).}

\item{cores}{Number of cores for parallel CV (default NULL = sequential).}

\item{seed}{Random seed for reproducibility (default 123).}

\item{predict_model}{Optional pre-computed `predict_pls_model` object. If
provided, skips the cross-validation step (saves time when predictions
have already been computed).}
}
\value{
An object of class `coa_analysis` containing:
  \item{pls_model}{The original estimated model}
  \item{focal_construct}{Name of the analyzed construct}
  \item{deviance_bounds}{Quantile bounds used}
  \item{predictive_deviance}{Predictive deviance results (class `coa_deviance`)}
  \item{deviance_tree}{Deviance tree and deviant groups (class `coa_dtree`)}
  \item{unstable}{Parameter instability results (class `coa_unstable`)}
}
\description{
`assess_coa` conducts a full Composite Overfit Analysis on a PLS-SEM model.
It computes predictive deviance for a focal construct, identifies groups of
deviant cases using a decision tree, and assesses parameter instability.
}
\examples{
\donttest{
library(seminr)
library(seminrExtras)

mobi_mm <- constructs(
  composite("Image",  multi_items("IMAG", 1:5)),
  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 = c("Image", "Value"), to = "Satisfaction"),
  paths(from = "Satisfaction", to = "Loyalty")
)

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

coa_result <- assess_coa(mobi_pls,
                          focal_construct = "Loyalty",
                          noFolds = 10,
                          cores = 1,
                          seed = 123)
print(coa_result)
summary(coa_result)
plot(coa_result, type = "pd")
}

}
\seealso{
[predictive_deviance()], [deviance_tree()], [unstable_params()],
  [group_rules()], [competes()]
}
