% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gau_utils.R
\name{.partial_corr_gau}
\alias{.partial_corr_gau}
\title{Compute intervenor-adjusted sample partial correlation}
\usage{
.partial_corr_gau(y, i, j, mu = NULL)
}
\arguments{
\item{y}{Numeric matrix n_subjects by n_time.}

\item{i}{Row/column index (larger time index).}

\item{j}{Row/column index (smaller time index), j < i.}

\item{mu}{Optional mean vector for centering.}
}
\value{
Sample partial correlation (scalar).
}
\description{
Computes the sample partial correlation between Y_i and Y_j, adjusted for
the intervenors Y_(j+1), ..., Y_(i-1), from the residuals of the fitted
mean structure.
}
\details{
The intervenor-adjusted partial correlation r_(i,j|(j+1:i-1)) is computed
from residuals of regressing Y_i and Y_j on the intervenors.

Under AD(p), the partial correlation r_(i,i-k|(i-k+1:i-1)) should be
approximately zero for k > p.
}
\keyword{internal}
