Tutorials › Generalized Linear Models › AR(1) Correlation for Ordered Repeated Measurements

Working Correlation Choices · Tutorial 860 of 981

AR(1) Correlation for Ordered Repeated Measurements

Learn how an AR(1) working correlation encodes visit-lag distance, when its matrix is valid and invertible, and how to calculate its entries.

Advanced 9 min read

What You'll Learn

  • Construct the AR(1) working correlation matrix from ordered visit indices
  • Distinguish a valid positive-semidefinite matrix from a positive-definite one
  • Prove the admissible range for the correlation parameter
  • Calculate correlations between visits separated by a given number of intervals
  • Interpret negative and positive AR(1) correlations
  • Derive the determinant and inverse of the AR(1) matrix

Why Visit Order Matters

Repeated measurements on the same subject are often more strongly correlated when taken close together than when taken farther apart. The discrete-time AR(1) working correlation represents this pattern with one parameter: the correlation between measurements declines geometrically as the number of visit intervals between them increases. Its simplicity is useful in generalized estimating equations (GEE), but it comes with a specific assumption about how the visit schedule is indexed.

Here, visits are ordered and equally spaced in the schedule: consecutive visits have index distance one, two visits apart have index distance two, and so on. The model uses this index distance, not a separately measured duration of elapsed time. For a cluster \(i\) with \(m_i\) visits, write \(R_i\) for its working correlation matrix.

Definition: The discrete-time AR(1) working correlation matrix for \(m\) ordered visits has entries $$ R_{jk}=\rho^{|j-k|}, \qquad j,k=1,\ldots,m, $$ where \(\rho\) is the correlation between consecutive visits. Its diagonal entries are \(1\), and its off-diagonal entries depend only on the number of visit intervals separating the two measurements.

For example, the first row of the matrix begins \(1,\rho,\rho^2,\rho^3,\ldots\). The matrix is symmetric because \(|j-k|=|k-j|\). A cluster with a different number of visits has a matrix of a different dimension, but the same \(\rho\) gives the same correlation at each given visit lag.

Admissible Values of the Correlation Parameter

A correlation matrix must be positive semidefinite: for any real vector \(a\), \(a^\mathsf{T}Ra\geq 0\). In GEE calculations, the working correlation matrix is ordinarily required to be positive definite so it can be inverted. For two or more visits, the AR(1) structure is positive definite exactly when \(-1<\rho<1\). The endpoints give valid but singular correlation matrices; values outside the closed interval are not valid correlations.

Theorem: For \(m\geq 2\), the matrix with entries \(R_{jk}=\rho^{|j-k|}\) is a correlation matrix if and only if \(-1\leq\rho\leq 1\). It is positive definite if and only if \(-1<\rho<1\). For \(|\rho|<1\), $$ \det(R)=(1-\rho^2)^{m-1}. $$

Proof. Necessity of \(|\rho|\leq 1\) follows from the \(2\times 2\) principal submatrix for any consecutive pair of visits:

$$ \begin{pmatrix}1&\rho\\ \rho&1\end{pmatrix}. $$

Its determinant is \(1-\rho^2\), which must be nonnegative for a positive-semidefinite matrix. Conversely, suppose \(|\rho|<1\), and set \(s=\sqrt{1-\rho^2}\). Define a lower-triangular matrix \(L\) by

$$ L_{j1}=\rho^{j-1},\qquad L_{j\ell}=s\rho^{j-\ell}\ \ (2\leq\ell\leq j),\qquad L_{j\ell}=0\ \ (\ell>j). $$

For each row \(j\), its squared length is

$$ \sum_{\ell=1}^{j}L_{j\ell}^2 =\rho^{2(j-1)}+(1-\rho^2)\sum_{r=0}^{j-2}\rho^{2r} =1, $$

where for \(j=1\) the sum with no terms is zero. If \(j>k\), the inner product of rows \(j\) and \(k\) is

$$ \sum_{\ell=1}^{k}L_{j\ell}L_{k\ell} =\rho^{j-k}\left\{\rho^{2(k-1)} +(1-\rho^2)\sum_{r=0}^{k-2}\rho^{2r}\right\} =\rho^{j-k}. $$

Thus \(LL^\mathsf{T}=R\). The diagonal entries of \(L\) are \(1,s,\ldots,s\), all nonzero, so \(L\) is nonsingular. For any nonzero vector \(a\), \(a^\mathsf{T}Ra=\|L^\mathsf{T}a\|^2>0\). Hence \(R\) is positive definite. Its determinant is

$$ \det(R)=\det(L)^2 =\left(s^{m-1}\right)^2 =(1-\rho^2)^{m-1}. $$

At \(\rho=1\), every entry of \(R\) is \(1\); at \(\rho=-1\), \(R_{jk}=(-1)^{|j-k|}\). In either case the matrix has rank one when \(m\geq2\), so it is positive semidefinite but singular. Finally, if \(|\rho|>1\), the consecutive-pair determinant \(1-\rho^2\) is negative, ruling out a correlation matrix. This proves the claims. \(\square\)

Worked Example: Building a Four-Visit Matrix

Suppose the consecutive-visit correlation is \(\rho=0.6\), and each subject is measured at four equally spaced visits. Since the lag-one correlation is \(0.6\), the lag-two correlation is \(0.6^2=0.36\), and the lag-three correlation is \(0.6^3=0.216\). Therefore,

$$ R= \begin{pmatrix} 1&0.6&0.36&0.216\\ 0.6&1&0.6&0.36\\ 0.36&0.6&1&0.6\\ 0.216&0.36&0.6&1 \end{pmatrix}. $$

The parameter is strictly between \(-1\) and \(1\), so the matrix is positive definite. Its determinant provides a numerical check:

$$ \det(R)=(1-0.6^2)^3=(0.64)^3=0.262144>0. $$

For example, visits 1 and 4 are three intervals apart, so their correlation is \(0.6^3=0.216\), as shown in the matrix.

How Lag Determines Correlation

The defining formula gives a direct calculation rule. If two measurements are \(h\) visit intervals apart, their working correlation is \(\rho^h\), regardless of where that pair occurs in the schedule. For positive \(\rho\), correlations remain positive and decrease in magnitude with lag. For negative \(\rho\), their signs alternate with lag. These are implications of the structure, not claims that every real repeated-measures process follows this pattern.

Result: For \(h\geq 0\), the AR(1) working correlation at lag \(h\) is \(c_h=\rho^h\). In particular, \(c_0=1\), \(c_1=\rho\), and \(c_{h+1}=\rho c_h\).

Derivation. Choose any visits \(j\) and \(k\) with \(|j-k|=h\). Substitution in the matrix definition gives \(R_{jk}=\rho^{|j-k|}=\rho^h\). Increasing their separation by one interval gives \(c_{h+1}=\rho^{h+1}=\rho c_h\). Thus the same lag has the same correlation wherever it occurs in the schedule, and each additional interval multiplies the previous lag correlation by \(\rho\). \(\square\)

Worked Example: Negative Consecutive-Visit Correlation

Let \(\rho=-0.5\) for four ordered visits. The parameter is admissible because \(-1<-0.5<1\). The lag-one correlation is \(-0.5\), the lag-two correlation is \((-0.5)^2=0.25\), and the lag-three correlation is \((-0.5)^3=-0.125\). The resulting matrix is

$$ R= \begin{pmatrix} 1&-0.5&0.25&-0.125\\ -0.5&1&-0.5&0.25\\ 0.25&-0.5&1&-0.5\\ -0.125&0.25&-0.5&1 \end{pmatrix}. $$

The signs alternate as the lag increases, while the magnitude decreases. Positive definiteness is confirmed by

$$ \det(R)=\{1-(-0.5)^2\}^3=(0.75)^3=0.421875>0. $$

A negative \(\rho\) is mathematically allowed; whether that pattern is scientifically plausible is a separate question about the study and its measurements.

Worked Example: Comparing Correlations at Different Lags

Suppose six measurements are taken at equally spaced visits and \(\rho=0.8\). Compare the correlations between visits 1 and 5, visits 2 and 5, and visits 3 and 5.

Visits 1 and 5 are four intervals apart, so their correlation is \(0.8^4=0.4096\). Visits 2 and 5 are three intervals apart, giving \(0.8^3=0.512\). Visits 3 and 5 are two intervals apart, giving \(0.8^2=0.64\). In each case the exponent is the absolute difference between the visit indices:

$$ R_{1,5}=0.8^{|1-5|}=0.4096,\qquad R_{2,5}=0.8^{|2-5|}=0.512,\qquad R_{3,5}=0.8^{|3-5|}=0.64. $$

The closer pairs have larger correlations in this example because \(0<\rho<1\). The comparison also illustrates that the same lag gives the same correlation: for instance, any pair of visits two intervals apart has correlation \(0.64\).

The Inverse and Its Role in GEE

A positive-definite working correlation matrix can be inverted. For the AR(1) structure, the inverse has a particularly simple form: it is tridiagonal. This is useful computationally and also reinforces why the strict range \(-1<\rho<1\) matters for GEE calculations that use the inverse.

Result: For \(m\geq2\) and \(|\rho|<1\), the inverse of the AR(1) correlation matrix is $$ R^{-1}=\frac{1}{1-\rho^2} \begin{pmatrix} 1&-\rho&0&\cdots&0\\ -\rho&1+\rho^2&-\rho&\ddots&\vdots\\ 0&-\rho&1+\rho^2&\ddots&0\\ \vdots&\ddots&\ddots&\ddots&-\rho\\ 0&\cdots&0&-\rho&1 \end{pmatrix}. $$

Derivation. Let \(Y\) be a vector with covariance matrix \(R\). Define \(U_1=Y_1\) and \(U_j=(Y_j-\rho Y_{j-1})/s\) for \(j=2,\ldots,m\), where \(s=\sqrt{1-\rho^2}\). From \(R_{jk}=\rho^{|j-k|}\), each \(U_j\) has variance \(1\). For \(j\geq2\), its covariance with an earlier \(Y_k\), \(k<j\), is

$$ \operatorname{Cov}(Y_j-\rho Y_{j-1},Y_k) =\rho^{j-k}-\rho\,\rho^{j-1-k}=0. $$

It follows that the \(U_j\)'s are pairwise uncorrelated and have variance \(1\), so their covariance matrix is the identity. If \(T\) is the matrix mapping \(Y\) to \(U\), then \(TRT^\mathsf{T}=I\), and therefore \(R^{-1}=T^\mathsf{T}T\). Multiplying these matrices gives diagonal entries \(1/(1-\rho^2)\) at the endpoints, \((1+\rho^2)/(1-\rho^2)\) in the interior, and adjacent off-diagonal entries \(-\rho/(1-\rho^2)\); all other entries are zero. This is the displayed expression. \(\square\)

In a GEE, the working correlation supplies a structured representation of within-cluster dependence. Its consequences for weighting depend on the full working covariance, not on \(R_i\) alone. The AR(1) choice is attractive when a single lag-one parameter is a reasonable summary and the measurement order is meaningful. It can be a poor description if correlation does not decline geometrically by visit index or if the visit intervals are not equal. In particular, assigning exponent \(|j-k|\) does not automatically account for unequal elapsed times.

Common Mistakes

  • Using \(\rho\) at every off-diagonal position. That gives an exchangeable structure, not AR(1). In AR(1), a pair at lag two has correlation \(\rho^2\), and a pair at lag three has correlation \(\rho^3\).
  • Assuming \(\rho\) must be positive. The mathematical admissible range includes negative values. A negative value yields alternating signs across successive lags.
  • Including the endpoints when an inverse is needed. The endpoint matrices are positive semidefinite but singular for \(m\geq2\). For an invertible working correlation, use \(-1<\rho<1\).
  • Confusing visit-index lag with elapsed time. The exponent is the number of scheduled intervals between visits. The formula does not itself adjust for unequal interval lengths.
Key takeaway: For ordered, equally spaced visits, AR(1) assigns correlation \(\rho^h\) to measurements \(h\) intervals apart. With at least two visits, \(|\rho|\leq1\) is required for a valid correlation matrix, while \(|\rho|<1\) is required for positive definiteness and inversion.

Check Your Understanding

Use the visit-index lag explicitly in each calculation.

  1. For five visits and \(\rho=0.4\), what is the correlation between visits 1 and 4?
  2. For \(\rho=-0.3\), calculate the lag-one, lag-two, and lag-three correlations. Explain the sign pattern.
  3. Why is \(\rho=1\) not suitable when an invertible working correlation matrix is required?
  4. For a four-visit AR(1) matrix, write the correlation between visits 2 and 4 as a power of \(\rho\).
  5. What assumption about the visit schedule is made when the AR(1) exponent is \(|j-k|\)?
Clinical Biostats