% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/advanced-modality-bridges.R
\name{extract_gazepoint_edr_pca}
\alias{extract_gazepoint_edr_pca}
\title{Extract ECG-derived respiration using PCA}
\usage{
extract_gazepoint_edr_pca(
  dat,
  ecg_cols,
  time_col = NULL,
  group_cols = NULL,
  n_components = 1,
  scale = TRUE,
  output_prefix = "edr_pca"
)
}
\arguments{
\item{dat}{A data frame.}

\item{ecg_cols}{Numeric ECG morphology columns.}

\item{time_col}{Optional time column.}

\item{group_cols}{Optional grouping columns.}

\item{n_components}{Number of PCA components to retain.}

\item{scale}{Logical. If \code{TRUE}, scale ECG morphology columns before PCA.}

\item{output_prefix}{Prefix for PCA output columns.}
}
\value{
A list with \code{overview}, \code{edr_timeseries}, \code{component_summary}, and
\code{settings}.
}
\description{
Extracts an ECG-derived respiration proxy from beat-level ECG morphology
features using principal component analysis. This function requires
ECG-derived morphology columns, such as QRS amplitudes, widths, or sampled
beat-shape features. It is not intended for HR, IBI, or PPG-only data.
}
