Tutorials › Generalized Linear Mixed Models (GLMM) › AR(1) Working Correlation For Repeated Measures

GLMM Versus GEE · Tutorial 133 of 698

AR(1) Working Correlation For Repeated Measures

Learn to specify an AR(1) working correlation in GEE, interpret its lag parameter, and check when its equal-spacing and decay assumptions are appropriate.

Intermediate 10 min read

What You'll Learn

  • Write the AR(1) working correlation matrix for repeated measurements.
  • Interpret the working parameter and calculate correlations at different temporal lags.
  • Distinguish a working correlation matrix from the working covariance matrix.
  • Handle a missing visit without treating observations separated by multiple time steps as adjacent.
  • Identify assumptions, diagnostics, and limitations of the AR(1) structure.

Why Model Correlation by Time Lag?

Repeated measurements from the same person or other unit are usually dependent. In a GEE analysis, the mean model describes the expected outcome at each occasion, while a working correlation structure summarizes how measurements within a cluster are related. The AR(1) structure is useful when measurements are taken at equally spaced occasions and nearby measurements are expected to be more strongly correlated than measurements farther apart.

“AR(1)” refers to a first-order autoregressive correlation pattern. Its key feature is that correlation depends on the number of time steps separating two measurements, not on the identity of the occasions themselves. The pattern is parsimonious: one parameter specifies all within-cluster correlations.

Definition: For a cluster with measurements at equally spaced occasions \(1,\ldots,m_i\), an AR(1) working correlation matrix \(R_i(\rho)\) has entries $$ \{R_i(\rho)\}_{jk}=\rho^{|j-k|}, \qquad -1<\rho<1. $$ Here \(j\) and \(k\) index occasions within cluster \(i\), and \(\rho\) is the working correlation between measurements at adjacent occasions. Thus measurements \(h\) time steps apart have working correlation \(\rho^h\).

The parameter \(\rho\) is a correlation parameter, so it has no units. When \(0<\rho<1\), the correlation is positive and its magnitude decreases geometrically with the time lag. When \(\rho=0\), the working structure is independence. A negative \(\rho\) is also mathematically permitted: the sign alternates by lag, while the magnitude decreases when \(|\rho|<1\). In many applications, the anticipated pattern is positive decay, but that is a substantive expectation rather than part of the general definition.

From Correlation to the Working Covariance

The AR(1) matrix describes correlations, not the variances of the outcomes. In GEE, let \(Y_i\) be the vector of outcomes for cluster \(i\), and let \(\mu_i\) be the corresponding vector of marginal means. Let \(A_i\) be the diagonal matrix of marginal variances for those outcomes. The working covariance matrix is formed by combining those marginal variances with the working correlation:

$$ V_i=A_i^{1/2}R_i(\rho)A_i^{1/2}. $$

If a dispersion parameter \(\phi\) is used, the covariance may instead be written \(\phi A_i^{1/2}R_i(\rho)A_i^{1/2}\). For a Bernoulli outcome, the marginal variance at occasion \(j\) is \(\mu_{ij}(1-\mu_{ij})\). The correlation matrix has ones on its diagonal; the covariance matrix has the marginal variances on its diagonal. Confusing these matrices can produce incorrect calculations and interpretations.

The working covariance enters the GEE through the cluster contributions to the estimating equation. In the usual notation, if \(D_i=\partial\mu_i/\partial\beta^T\), the equation is

$$ \sum_i D_i^T V_i^{-1}(Y_i-\mu_i)=0. $$

The mean model and the working correlation play distinct roles: \(\mu_i\) gives the modeled marginal means, while \(V_i\) describes the assumed within-cluster variance and dependence used in the estimating equation.

Worked Example: A Four-Visit AR(1) Matrix

Suppose each hypothetical participant is measured at four equally spaced weekly visits, and the working adjacent-visit correlation is \(\rho=0.60\). The correlation at lag two is \(0.60^2=0.36\), and at lag three it is \(0.60^3=0.216\). Therefore,

$$ R_i(0.60)= \begin{pmatrix} 1 & 0.60 & 0.36 & 0.216\\ 0.60 & 1 & 0.60 & 0.36\\ 0.36 & 0.60 & 1 & 0.60\\ 0.216 & 0.36 & 0.60 & 1 \end{pmatrix}. $$

For example, visits 1 and 4 are three weekly steps apart, so their working correlation is \(\rho^{|1-4|}=0.60^3=0.216\). Visits 2 and 4 are two steps apart, giving \(0.60^2=0.36\). The equal spacing condition is satisfied by the stated weekly schedule. These are working correlations specified for the GEE, not claims that the actual correlations are exactly known.

Why the Geometric Pattern Is a Valid Correlation Structure

A working correlation matrix must be positive definite (or, in some boundary cases, positive semidefinite) so that it represents a valid covariance pattern and can be inverted in the estimating equation. The AR(1) matrix is positive definite for \(|\rho|<1\). One justification uses a standardized first-order process as a mathematical construction. Let \(Z_1\) and the innovations \(\varepsilon_2,\ldots,\varepsilon_m\) be independent with mean zero and variance one, and define

$$ Z_t=\rho Z_{t-1}+\sqrt{1-\rho^2}\,\varepsilon_t,\qquad t=2,\ldots,m. $$

Each \(Z_t\) has variance one: if \(\operatorname{Var}(Z_{t-1})=1\), independence gives \(\operatorname{Var}(Z_t)=\rho^2+(1-\rho^2)=1\). For \(s<t\), repeated substitution expresses \(Z_t\) as \(\rho^{t-s}Z_s\) plus innovations independent of \(Z_s\). Consequently,

$$ \operatorname{Corr}(Z_s,Z_t)=\operatorname{Cov}(Z_s,Z_t)=\rho^{t-s}. $$

This construction gives a valid correlation matrix with the AR(1) entries. It is a justification for the matrix form; it does not require the observed outcomes in a GEE to follow a Gaussian autoregressive process. The “working” structure is a chosen dependence approximation.

At \(\rho=1\) or \(\rho=-1\), the matrix is singular for more than one occasion. Values outside \([-1,1]\) cannot be correlations at lag one. The usual admissible range \(-1<\rho<1\) therefore ensures a nonsingular AR(1) matrix for a finite set of repeated occasions.

Worked Example: A Missed Visit and the Actual Time Lag

Consider hypothetical planned visits at weeks 0, 1, 2, and 3. A participant has outcomes recorded at weeks 0, 1, and 3, with the week-2 measurement missing. Suppose the working adjacent-week correlation is \(\rho=0.50\). The observed measurements are not equally spaced when listed simply as first, second, and third records, so use their planned time positions to determine the lags.

The week-0 and week-1 measurements are one week apart, with correlation \(0.50^1=0.50\). The week-1 and week-3 measurements are two weeks apart, with correlation \(0.50^2=0.25\). The week-0 and week-3 measurements are three weeks apart, with correlation \(0.50^3=0.125\). Thus the working correlation matrix for the observed outcomes, ordered by their actual weeks, is

$$ R_i(0.50)= \begin{pmatrix} 1 & 0.50 & 0.125\\ 0.50 & 1 & 0.25\\ 0.125 & 0.25 & 1 \end{pmatrix}. $$

The planned schedule is equally spaced, so the AR(1) lag rule applies despite the missing outcome. Treating the three recorded outcomes as consecutive occasions would incorrectly assign correlation \(0.50\) to the week-1 and week-3 pair. The time interval, not the order of the available records, determines the lag.

Worked Example: Converting Correlation to Covariance

Suppose a hypothetical participant has three Bernoulli outcomes with marginal means \(\mu_i=(0.20,0.50,0.80)^T\), and the working adjacent-visit correlation is \(\rho=0.50\). The marginal variances are \(0.20(0.80)=0.16\), \(0.50(0.50)=0.25\), and \(0.80(0.20)=0.16\). Hence \(A_i=\operatorname{diag}(0.16,0.25,0.16)\). The correlation matrix is

$$ R_i(0.50)= \begin{pmatrix} 1 & 0.50 & 0.25\\ 0.50 & 1 & 0.50\\ 0.25 & 0.50 & 1 \end{pmatrix}. $$

The covariance between occasions \(j\) and \(k\) equals the correlation multiplied by the product of their standard deviations. For occasions 1 and 2, this is \(0.50\sqrt{0.16}\sqrt{0.25}=0.50(0.40)(0.50)=0.10\). For occasions 1 and 3, it is \(0.25(0.40)(0.40)=0.040\). Therefore,

$$ V_i= \begin{pmatrix} 0.16 & 0.10 & 0.040\\ 0.10 & 0.25 & 0.10\\ 0.040 & 0.10 & 0.16 \end{pmatrix}. $$

The diagonal entries are the marginal variances, and the off-diagonal entries are covariances. The correlation between occasions 1 and 3 remains \(0.25\); it is not the covariance \(0.040\). The Bernoulli marginal variances used here are appropriate for the stated outcome type and means.

Assumptions, Diagnostics, and Alternatives

The AR(1) working structure is most natural when the measurement occasions lie on a regular time grid and the dependence is reasonably stable across that grid. In its standard form, it assumes the same adjacent-occasion correlation \(\rho\) throughout a cluster and the same lag-\(h\) correlation \(\rho^h\) wherever that lag occurs. It does not permit a different correlation for every pair of occasions. The GEE mean model still needs to be specified appropriately, and clusters are treated as independent of one another. Within a cluster, the AR(1) matrix is a working approximation rather than a guarantee about the true joint distribution.

A practical check is to compare residual association at different time lags with the pattern implied by the fitted \(\rho\). If observed residual correlations do not generally decline in a geometric pattern, or if correlations appear to differ substantially by occasion, the AR(1) approximation may be inadequate. Also check that the analysis uses the actual time gaps: for irregular schedules, “one visit apart” may not represent a common duration. A single lag parameter indexed only by visit number can then be misleading.

The independence working structure sets all off-diagonal correlations to zero. It is simpler, but does not represent within-cluster association in the working covariance. The exchangeable structure instead uses one common correlation for every distinct pair in a cluster, regardless of their temporal separation. AR(1) is a more time-sensitive alternative when correlation is expected to fade with lag. An unstructured working correlation allows pair-specific correlations, but does not impose the AR(1) decay pattern and uses more parameters. Each structure trades flexibility against parsimony.

A common pitfall is to say, “The AR(1) model assumes the correlation is \(\rho\) for every pair of visits.” That describes an exchangeable structure, not AR(1). Under AR(1), only adjacent occasions have correlation \(\rho\); two occasions \(h\) steps apart have correlation \(\rho^h\). Another mistake is to treat the working correlation as a causal effect or as proof that outcomes follow a latent autoregressive process. It is neither: it is a specification for within-cluster association used in GEE.

AR(1) is parsimonious, but that simplicity is also a limitation. A single parameter cannot express increasing correlation over some intervals, a sharp change after treatment, or different dependence patterns in different parts of follow-up. If those features are important, the fitted structure may represent the data poorly. Inference based on the working covariance as if it were correct can then be unreliable; GEE analyses commonly use a robust variance estimate to reduce reliance on the working correlation being exactly correct. That protection does not repair a misspecified mean model or make an implausible time indexing scheme appropriate.

Key takeaway: For equally spaced repeated measures, AR(1) assigns correlation \(\rho^h\) to observations \(h\) time steps apart. Use the actual time lag, distinguish correlation from covariance, and regard the matrix as a working representation of within-cluster dependence.

Check Your Understanding

Answer each question, then compare with the brief solutions below.

  1. If \(\rho=0.70\), what is the AR(1) working correlation between measurements four time steps apart?
  2. For \(\rho=0.40\), what correlation should be assigned to visits 2 and 5 on an equally spaced schedule?
  3. A measurement at the planned middle visit is missing. Should the two recorded measurements on either side be treated as adjacent for the AR(1) lag calculation?
  4. In \(V_i=A_i^{1/2}R_iA_i^{1/2}\), which matrix contains the marginal variances, and which contains the correlations?
  5. How does AR(1) differ from an exchangeable working correlation?

Solutions. (1) The lag is four, so the correlation is \(0.70^4=0.2401\). (2) Visits 2 and 5 are three steps apart, so the correlation is \(0.40^3=0.0640\). (3) No. Use the planned time positions; the pair is separated by two time steps, so its correlation is \(\rho^2\). (4) \(A_i\) contains the marginal variances on its diagonal; \(R_i\) contains the working correlations. (5) AR(1) assigns \(\rho^h\) according to lag \(h\), whereas exchangeable correlation assigns the same value to every distinct pair.

Clinical Biostats