% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/feature_coa.R
\name{predictive_deviance}
\alias{predictive_deviance}
\title{Compute Predictive Deviance}
\usage{
predictive_deviance(
  seminr_model,
  focal_construct,
  technique = predict_DA,
  noFolds = 10,
  reps = 1,
  cores = NULL,
  seed = 123,
  predict_model = NULL
)
}
\arguments{
\item{seminr_model}{An estimated SEMinR model.}

\item{focal_construct}{Name of the construct to analyze.}

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

\item{noFolds}{Number of CV folds (default 10).}

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

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

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

\item{predict_model}{Optional pre-computed `predict_pls_model` object.}
}
\value{
An object of class `coa_deviance` containing PD values, metrics,
  and the data frame used for tree construction.
}
\description{
Computes per-case predictive deviance (PD) for a focal construct using
k-fold cross-validated predictions from `predict_pls()`.
}
\details{
PD = in-sample fitted score - out-of-sample predicted score.
High PD indicates a case that is well-fitted in-sample but poorly predicted
out-of-sample, suggesting overfit.
}
\seealso{
[assess_coa()], [deviance_tree()]
}
