% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/misc-06-acc.R
\name{acc}
\alias{acc}
\title{Auto Cross Covariance (ACC) for Generating Scales-Based Descriptors
of the Same Length}
\usage{
acc(mat, lag)
}
\arguments{
\item{mat}{A \code{p * n} matrix. Each row represents one scale
(total \code{p} scales), each column represents one amino acid position
(total \code{n} amino acids).}

\item{lag}{The lag parameter. Must be less than the amino acids.}
}
\value{
A length \code{lag * p^2} named vector, the element names are
constructed by: the scales index (crossed scales index) and lag index.
}
\description{
This function calculates the auto covariance and auto cross covariance
for generating scale-based descriptors of the same length.
}
\note{
Please see the references for details about auto cross covariance.
}
\examples{
p <- 8 # p is the scales number
n <- 200 # n is the amino acid number
lag <- 7 # the lag paramter
mat <- matrix(rnorm(p * n), nrow = p, ncol = n)
acc(mat, lag)
}
\references{
Wold, S., Jonsson, J., Sj\"{o}rstr\"{o}m, M., Sandberg, M., & R\"{a}nnar, S. (1993).
DNA and peptide sequences and chemical processes multivariately modelled
by principal component analysis and partial least-squares projections
to latent structures.
\emph{Analytica chimica acta}, 277(2), 239--253.

Sj\"{o}str\"{o}m, M., R\"{a}nnar, S., & Wieslander, A. (1995).
Polypeptide sequence property relationships in \emph{Escherichia coli}
based on auto cross covariances.
\emph{Chemometrics and intelligent laboratory systems}, 29(2), 295--305.
}
\seealso{
See \code{\link{extractScales}} for scales-based descriptors.
For more details, see \code{\link{extractDescScales}}
and \code{\link{extractProtFP}}.
}
\author{
Nan Xiao <\url{https://nanx.me}>
}
