Signature
r = rho^s
| Inputs | Definition | Unit |
|---|---|---|
rho | Correlation between outcomes at adjacent visits, strictly between -1 and 1 and normally positive for repeated health measures | correlation |
s | Number of visit steps between the two measurements, the absolute difference between their visit numbers j and k | count of visits, 0 or above |
r | Correlation between the outcomes of one patient at two visits | correlation from -1 to 1 |
|---|
Function
Autoregressive correlation function for repeated health measurements
Maps the correlation between adjacent measurements on the same patient, and the distance between two measurements, to the correlation between them under a first-order autoregressive (AR(1)) structure. The correlation falls by the same factor with each step, so one parameter describes the whole within-patient correlation matrix. Combined with a common variance at every visit, the structure gives the variance of any weighted total or difference of the repeated measurements, such as a trial QALY total or a change in utility from baseline. In time-series notation the same pattern comes from the error process e_t = rho * e_(t-1) + u_t, which for a stationary series gives a correlation of rho^s between errors s periods apart.
Try this function
Implementations
Excel
AR(1) correlation and correlation matrix in Excel
With named cells AdjacentCorr and VisitSteps the formula returns the correlation. Entered in the top-left cell of a grid that starts at A1 and filled across and down, =AdjacentCorr^ABS(ROW()-COLUMN()) builds the full AR(1) correlation matrix for as many visits as the grid has rows.
=AdjacentCorr^VisitSteps
Assumptions
Equally spaced visits for the AR(1) step form
Each visit step represents the same elapsed time. With unequal spacing, for example visits at 0, 3, 6 and 12 months, counting steps treats a 3-month and a 6-month gap as the same distance, and the continuous-time form HE-FM-AR1-002 is used instead.
AR(1) correlation depends only on the distance between visits
The adjacent-visit correlation is the same throughout follow-up. When the structure is turned into a covariance, a common variance sigma2 at every visit is also assumed, giving a covariance of sigma2 * rho^s between visits s steps apart.
Pure AR(1) correlation decays towards zero
The correlation between distant visits approaches zero. Where stable differences between patients keep measurements correlated over long follow-up, a random intercept for each patient with AR(1) residuals gives a correlation that levels off at a floor instead.
Worked examples
Adjacent six-monthly utility visits at an AR(1) correlation of 0.7
In the article's illustrative trial with utility measured at baseline, 6 and 12 months, adjacent visits are one step apart and have a correlation of 0.7.
rho = 0.7; s = 1; r = 0.7
Baseline and 12-month utilities two AR(1) steps apart
Baseline and 12 months are two steps apart, so their correlation is 0.7 × 0.7 = 0.49, the value used for the outer pair in the article's QALY variance example.
rho = 0.7; s = 2; r = 0.49
Common errors
Assuming AR(1) correlation dies out over long follow-up
Pure AR(1) drives the correlation between distant visits towards zero, yet stable differences between patients keep utilities correlated over long follow-up. Fitting pure AR(1) to such data misdescribes the correlation between baseline and late visits; a random intercept with AR(1) residuals often fits better.
Reading an omitted trend as AR(1) serial correlation
An unmodelled trend or seasonal pattern leaves residuals that are correlated over time, which can look like autoregressive correlation. The mean model is checked first, for example with residual plots and the partial autocorrelation function, before an autoregressive error is added.
Confusing an AR(1) residual structure with a lagged outcome model
An AR(1) residual structure describes the dependence left after the mean model and keeps the regression coefficients marginal. Including the previous outcome as a covariate answers a conditional question, a distinction Liang and Zeger drew between their marginal approach and conditional models.
Sources
AR-1 working correlation in generalised estimating equations
Liang KY, Zeger SL. Longitudinal data analysis using generalized linear models. Biometrika. 1986;73(1):13-22. Section 4, Example 4, which gives the AR-1 working correlation as a power of the distance between observations, and the introduction, which distinguishes marginal from conditional models.
First-order autoregressive covariance pattern for longitudinal data
Fitzmaurice GM, Laird NM, Ware JH. Applied Longitudinal Analysis. 2nd ed. Hoboken, NJ: Wiley; 2011. Covariance pattern models, including the first-order autoregressive pattern with covariance sigma2 * rho^abs(j-k) between occasions j and k.
Checking residual autocorrelation before adding an AR(1) error
Bernal JL, Cummins S, Gasparrini A. Interrupted time series regression for the evaluation of public health interventions: a tutorial. International Journal of Epidemiology. 2017;46(1):348-355. Section on autocorrelation, which notes that seasonality often explains autocorrelation and recommends residual plots and the partial autocorrelation function.
Canonical Identity
Stable URI · Machine-readable · Resolvable · CC BY 4.0