BMJ 1994;308:896 (2 April)

Papers

Statistics Notes: Correlation, regression, and repeated data

J M Bland, D G Altman 

Department of Public Health Sciences, St George's Hospital Medical School, London SW 17 0RE Medical Statistics Laboratory, Imperial Cancer Research Fund, London WC2A 3PX Correspondence to: Dr Bland.

In clinical research we are often able to take several measurements on the same patient. The correct analysis of such data is more complex than if each patient were measured once. This is because the variability of measurements made on different subjects is usually much greater than the variability between measurements on the same subject, and we must take both kinds of variability into account. For example, we may want to investigate the relation between two variables and take several pairs of readings from each of a group of subjects. Such data violate the assumption of independence inherent in many analyses, such as t tests and regression.

Researchers sometimes put all the data together, as if they were one sample. Most statistics textbooks do not warn the researcher not to do this. It is so ingrained in statisticians that this is a bad idea that it never occurs to them that anyone would do it.

Consider the following example. The data were generated from random numbers, and there is no relation between X and Y at all. Firstly, values of X and Y were generated for each "subject," then a further random number was added to make the individual "observation." The data are shown in the table and figure. For each subject separately the correlation between X and Y is not significant. We have only five subjects and so only five points. Using each subject's mean values, we get the correlation coefficient r=-0.67, df=3, P=0.22. However, if we put all 25 observations together we get r=-0.47, df=23, P=0.02. Even though this correlation coefficient is smaller than that between means, because it is based on 25 pairs of observations rather than five it becomes significant. The calculation is performed as if we have 25 subjects, and so the number of degrees of freedom for the significance test is increased incorrectly and a spurious significant difference is produced. The extreme case would occur if we had only two subjects, with repeated pairs of observations on each. We would have two separate clusters of points centred at the subjects' means. We would get a high correlation coefficient, which would appear significant despite there being no relation whatsoever.


Simulated data showing five pairs of measurements of two uncorrelated
variables for subjects 1, 2, 3, 4, and 5
---------------------------------------------------------------------------------------------------------
                         Subject 1      Subject 2        Subject 3       Subject 4       Subject 5
---------------------------------------------------------------------------------------------------------
                        48      58      63      28      38      40       51     46       55     62
                        56      53      74      24      56      41       46     36       51     50
                        49      44      69      26      46      40       36     41       54     66
                        38      53      55      19      43      41       49     43       46     51
                        50      56      73      22      52      34       46     45       55     52
---------------------------------------------------------------------------------------------------------
Subject mean            48.2    52.8    66.8    23.8    47.0    39.2     45.6   42.2     52.2   56.2
---------------------------------------------------------------------------------------------------------
Correlation               r=-0.02          r=0.32          r=-0.30          r=0.37         r=0.55
coefficient               P=0.97           P=0.59          P=0.63           P=0.55         P=0.33



View larger version (8K):
[in this window]
[in a new window]
 
Simulated data for five pairs of measurement of two uncorrelated variables (X and Y) for five subjects

There are two simple ways to approach these types of data. If we want to know whether subjects with a high value of X tend also to have a high value of Y we can use the subject means and find the correlation between them. For different numbers of observations for each subject, we can use a weighted analysis, weighting by the number of observations for the subject. If we want to know whether changes in one variable in the same subject are paralleled by changes in the other we can estimate the relation within subjects using multiple regression. In either case we should not mix observations from different subjects indiscriminately, whether using correlation or the closely related regression analysis.

Related Articles

Correlation, regression, and repeated data
R Persaud, J M Bland, and D G Altman
BMJ 1994 308: 1510. [Extract] [Full Text]

Sample size
I Hill-Smith
BMJ 1994 308: 1304. [Extract] [Full Text]

This article has been cited by other articles:

  • Hoole, S. P., Boyd, J., Ninios, V., Parameshwar, J., Rusk, R. A. (2008). Measurement of cardiac output by real-time 3D echocardiography in patients undergoing assessment for cardiac transplantation. Eur J Echocardiogr 9: 334-337 [Abstract] [Full text]  
  • Hoole, S. P, Liew, T. V, Boyd, J., Wells, F. C, Rusk, R. A (2008). Transthoracic real-time three-dimensional echocardiography offers additional value in the assessment of mitral valve morphology and area following mitral valve repair. Eur J Echocardiogr 0: jen006v1-6 [Abstract] [Full text]  
  • Jenkins, C., Chan, J., Bricknell, K., Strudwick, M., Marwick, T. H. (2007). Reproducibility of Right Ventricular Volumes and Ejection Fraction Using Real-time Three-Dimensional Echocardiography: Comparison With Cardiac MRI. Chest 131: 1844-1851 [Abstract] [Full text]  
  • Jagathesan, R., Kaufmann, P. A., Rosen, S. D., Rimoldi, O. E., Turkeimer, F., Foale, R., Camici, P. G. (2005). Assessment of the Long-Term Reproducibility of Baseline and Dobutamine-Induced Myocardial Blood Flow in Patients with Stable Coronary Artery Disease. JNM 46: 212-219 [Abstract] [Full text]  
  • Neuberger, H.-R., Schotten, U., Verheule, S., Eijsbouts, S., Blaauw, Y., van Hunnik, A., Allessie, M. (2005). Development of a Substrate of Atrial Fibrillation During Chronic Atrioventricular Block in the Goat. Circulation 111: 30-37 [Abstract] [Full text]  
  • Jenkins, C., Bricknell, K., Hanekom, L., Marwick, T. H. (2004). Reproducibility and accuracy of echocardiographic measurements of left ventricular parameters using real-time three-dimensional echocardiography. J Am Coll Cardiol 44: 878-886 [Abstract] [Full text]  
  • Callow, J., Summers, L. K., Bradshaw, H., Frayn, K. N (2002). Changes in LDL particle composition after the consumption of meals containing different amounts and types of fat. Am. J. Clin. Nutr. 76: 345-350 [Abstract] [Full text]  
  • Kunst, P. W. A., Noordegraaf, A. V., Raaijmakers, E., Bakker, J., Groeneveld, A. B. J., Postmus, P. E., de Vries, P. M. J. M. (1999). Electrical Impedance Tomography in the Assessment of Extravascular Lung Water in Noncardiogenic Acute Respiratory Failure*. Chest 116: 1695-1702 [Abstract] [Full text]  
  • RAAIJMAKERS, E., FAES, TH. J. C., SCHOLTEN, R. J. P. M., GOOVAERTS, H. G., HEETHAAR, R. M. (1999). A Meta-analysis of Published Studies Concerning the Validity of Thoracic Impedance Cardiography. Ann. N. Y. Acad. Sci. 873: 121-127 [Abstract] [Full text]  
  • Altman, D. G, Bland, J M. (1997). Statistics Notes: Units of analysis. BMJ 314: 1874-1874 [Full text]  
  • Bland, J M., Altman, D. G (1995). Statistics notes: Calculating correlation coefficients with repeated observations: Part 2--correlation between subjects. BMJ 310: 633-633 [Full text]  
  • Bland, J M., Altman, D. G (1995). Statistics notes: Calculating correlation coefficients with repeated observations: Part 1--correlation within subjects. BMJ 310: 446-446 [Full text]  
  • Persaud, R, Bland, J M, Altman, D G (1994). Correlation, regression, and repeated data. BMJ 308: 1510-1510 [Full text]  
  • Hill-Smith, I (1994). Sample size. BMJ 308: 1304-1304 [Full text]  

Rapid Responses:

Read all Rapid Responses

A Repeated Measures Test for Comparing Devices
Bruce Siskowski
bmj.com, 16 Nov 2005 [Full text]



Student BMJ

Risk of surgery for inflammatory bowel disease: record linkage studies

What can you learn from this BMJ paper? Read Leanne Tite's Paper+

www.student.bmj.com

Listen to the latest BMJ Interview