% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/stats_stocsy.R
\name{stocsy}
\alias{stocsy}
\title{Statistical Total Correlation Spectroscopy (STOCSY)}
\usage{
stocsy(X, ppm = NULL, driver, plotting = TRUE, title = NULL)
}
\arguments{
\item{X}{Numeric matrix or data frame. Rows are spectra, columns are variables.}

\item{ppm}{Optional numeric vector of chemical shift values (length = ncol(X)).
If missing or NULL, will try to read from \code{colnames(X)}.}

\item{driver}{Numeric scalar (ppm value, internal driver) or numeric vector
(external driver, length = nrow(X)).}

\item{plotting}{Logical. If TRUE, plot the STOCSY spectrum.}

\item{title}{Optional character plot title.}
}
\value{
An object of class \code{m8_stocsy1d} (S3), a named list with entries:
\code{version, X, ppm, driver, r, cov, extD}.
}
\description{
Performs STOCSY analysis on 1D NMR spectra. Computes correlation and covariance
of all variables in \code{X} against a driver signal (internal ppm position or
an external numeric vector).
}
\examples{
# st <- stocsy(X, ppm, driver = 5.233, plotting = FALSE)
# plotStocsy(st, shift = c(5.15, 5.30))

data(covid)
cs = 5.233
stocsy(covid$X, driver=cs, plotting = TRUE)
}
\seealso{
Other structural_annotation: 
\code{\link{storm}()}
}
\concept{structural_annotation}
