% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sync-drift-diagnostics.R
\name{audit_gazepoint_biometric_sync_drift}
\alias{audit_gazepoint_biometric_sync_drift}
\title{Audit Gazepoint biometric synchronization drift}
\usage{
audit_gazepoint_biometric_sync_drift(
  data,
  time_col = NULL,
  group_cols = NULL,
  signal_pairs = NULL,
  signal_cols = NULL,
  reference_signal_col = NULL,
  max_lag = 1000,
  lag_step = NULL,
  drift_tolerance = NULL,
  method = c("pearson", "spearman"),
  min_complete_pairs = 20,
  use_first_difference = FALSE,
  include_reset_segments = TRUE
)
}
\arguments{
\item{data}{A Gazepoint biometric data frame.}

\item{time_col}{Optional time or counter column.}

\item{group_cols}{Optional grouping columns.}

\item{signal_pairs}{Optional two-column data frame, matrix, or list defining
signal pairs. If \code{NULL}, pairs are formed between a reference signal and
other detected biometric signals.}

\item{signal_cols}{Optional candidate signal columns used when \code{signal_pairs}
is \code{NULL}.}

\item{reference_signal_col}{Optional reference signal used when \code{signal_pairs}
is \code{NULL}.}

\item{max_lag}{Maximum absolute lag to evaluate, in the same units as
\code{time_col}.}

\item{lag_step}{Step size between candidate lags. If \code{NULL}, the median
positive time step is used.}

\item{drift_tolerance}{Optional threshold for the range of estimated lags
across groups. If \code{NULL}, drift is summarized but not threshold-classified.}

\item{method}{Correlation method passed to \code{\link[stats:cor]{stats::cor()}}.}

\item{min_complete_pairs}{Minimum complete aligned observations required for
each candidate lag.}

\item{use_first_difference}{If \code{TRUE}, lag diagnostics use first differences.}

\item{include_reset_segments}{If \code{TRUE}, reset segments from
\code{\link[=audit_gazepoint_time_resets]{audit_gazepoint_time_resets()}} are added to grouping when available.}
}
\value{
A list with \code{overview}, \code{checks}, \code{time_reset_audit},
\code{lag_by_group}, \code{lag_profile}, \code{drift_summary}, and \code{settings}.
}
\description{
Combines time-order/reset diagnostics with conservative signal-lag summaries
across signal pairs and groups. The helper is intended for quality control and
synchronization review. It does not infer emotional valence, cognitive states,
causal timing, or true physiological latency.
}
