% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gk_gamma_helpers.R
\name{gk_gamma_vec}
\alias{gk_gamma_vec}
\title{Goodman-Kruskal Gamma from Two Vectors (No table() Overhead)}
\usage{
gk_gamma_vec(x, y)
}
\arguments{
\item{x}{Integer or numeric vector (e.g., item scores).}

\item{y}{Integer or numeric vector of the same length (e.g., rest scores).}
}
\value{
A scalar: the gamma coefficient in \eqn{[-1, 1]}, or
\code{NA_real_} if the table has fewer than 2 rows or 2 columns.
}
\description{
Computes the Goodman-Kruskal gamma coefficient directly from two
numeric vectors, bypassing \code{table()} for speed. Uses manual
tabulation with integer indexing and cumulative sums for efficient
concordant/discordant pair counting.
}
\references{
Goodman, L. A. & Kruskal, W. H. (1954). Measures of association for
cross classifications. \emph{Journal of the American Statistical
Association}, \emph{49}(268), 732--764.
}
\keyword{internal}
