% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/eta2p.R
\name{batch_eta2p}
\alias{batch_eta2p}
\title{Batch Calculate Partial Eta-Squared for Multiple Effects}
\usage{
batch_eta2p(
  model,
  data,
  design = c("crossed", "nested", "mixed"),
  subj_var = NULL,
  item_var = NULL,
  cross_vars = NULL,
  nest_vars = NULL,
  operative = FALSE,
  partial_predictors = TRUE,
  verbose = FALSE
)
}
\arguments{
\item{model}{A fitted model object from \code{lme4::lmer()}.}

\item{data}{Data frame used to fit the model.}

\item{design}{Character string: \code{"crossed"}, \code{"nested"}, or
\code{"mixed"}. Use \code{"mixed"} when the model contains both crossed and
nested random effects (e.g., photos nested within models, but both crossed
with participants).}

\item{subj_var}{Character string specifying the subject/participant grouping
variable. Retained for backward compatibility; prefer \code{cross_vars}.}

\item{item_var}{Character string specifying the item/stimulus grouping
variable. Retained for backward compatibility; prefer \code{cross_vars}.}

\item{cross_vars}{Character vector of grouping variable names that are
\emph{crossed} with each other and with the nested hierarchy
(e.g., \code{c("participant")} or \code{c("participant", "rater")}).
Supersedes \code{subj_var} and \code{item_var} when provided.}

\item{nest_vars}{Character vector of nesting variables ordered from lowest
to highest level (e.g., \code{c("photo", "model")} when photos are nested
within models). Required for \code{design = "nested"} or
\code{design = "mixed"}.}

\item{operative}{Logical. If \code{TRUE}, calculates operative effect size
(excludes variance components that do not contribute to the SE of the
effect). Default is \code{FALSE}.}

\item{partial_predictors}{Logical. If \code{TRUE} (the default), the variance
attributed to a single (non-interaction) predictor is its \emph{unique}
(semipartial) variance -- the variance remaining after removing the part
linearly predictable from the other fixed-effect predictors, equivalently
\eqn{\mathrm{Var}(X) \times \mathrm{tol}(X)} where \eqn{\mathrm{tol}} is the
predictor's tolerance. This yields a measure that reflects only the unique
contribution of the predictor and declines as its redundancy with the
others increases. If \code{FALSE}, the predictor's \emph{total} variance is
used instead (the raw decomposition). For centered, orthogonal designs the
two are identical; they differ only when predictors are correlated. See
Details. Has no effect on interaction terms (whose components are always
centered) or when \code{var_x} is supplied.}

\item{verbose}{Logical. If \code{TRUE}, prints detailed results. Default is
\code{FALSE}.}
}
\value{
A data frame with one row per effect containing:
\item{effect}{Name of the fixed effect.}
\item{eta2p}{Partial eta-squared value.}
\item{effect_level}{Effect level (nested/mixed designs only).}
\item{variance_effect}{Variance attributed to the effect.}
\item{variance_error}{Error variance used in the denominator.}
\item{type}{\code{"general"} or \code{"operative"}.}
\item{within_subj, within_item}{(Crossed/mixed, operative only) Whether the
effect is within subjects / within items.}

Rows are sorted by \code{eta2p} in decreasing order.
}
\description{
Calculates partial eta-squared for all fixed effects (excluding the
intercept) in a model, returning one row per model coefficient. For a
multi-level factor or multi-df interaction this yields one value
\emph{per contrast} (per design-matrix column), not a single factor-level
value; for the omnibus effect size of such a term, use
\code{\link{eta2p_omnibus}}.
}
