Concept Architecture
Pairwise Deletion in Correlation and Covariance Matrices
Pairwise deletion handles incomplete data by computing each correlation or covariance from the patients who have values for both variables in that pair, and each mean or variance from everyone observed on that variable. The resulting matrix of summary statistics can rest on a different group of patients in every cell, yet it is often passed to a regression, a factor analysis or a structural equation model as if it came from one complete dataset. In health economics it turns up in correlation tables for trial data, in factor analyses of patient-reported outcome items and in regressions that supply correlated parameters to decision models, and the matrix it yields can describe no possible set of patients. Applied to mean costs and QALYs by trial arm, the same idea is usually called available case analysis. The term has no connection with pairwise meta-analysis, which compares two treatments across trials.
How the pairwise matrix is assembled
Van Buuren, in Flexible Imputation of Missing Data, describes pairwise deletion, also known as available-case analysis, as calculating means and (co)variances on all observed data. The mean of a variable uses every case observed on it, while each correlation and covariance uses all cases observed on both variables. The summary matrix is then fed into regression, factor analysis or other modelling software.
For two variables and , the pairwise sample size is , and the Pearson correlation is computed over those patients only.
where is the number of patients, is the response indicator, equal to 1 when patient has an observed value of variable and 0 otherwise, is the set of patients observed on both and , is the value of variable for patient , and is the mean of variable among the patients in . Each off-diagonal cell of the correlation matrix has its own and its own .
Defaults in common software
The Stata manual states that pwcorr handles missing values by pairwise deletion by default while correlate uses listwise deletion. The R documentation for cor states that use = "pairwise.complete.obs" computes each correlation or covariance from all complete pairs of observations on those variables. The lavaan documentation explains that with categorical data and an estimator from the (weighted) least squares family the only option besides listwise deletion is pairwise, with polychoric correlations computed two variables at a time. A confirmatory factor analysis of ordinal quality-of-life items fitted this way can rest on a pairwise matrix without the report saying so.
The assumption behind consistent estimates
Pairwise estimates are sound only when every pair subset represents the same population. Van Buuren, citing Little and Rubin, reports that when data are missing completely at random (MCAR), pairwise deletion gives consistent estimates of means, correlations and covariances, and that the estimates can be biased if the data are not MCAR. Under MCAR each is a random subsample, so every cell estimates the same population correlation.
Under missing at random that guarantee goes. If patients with severe disease return utility questionnaires less often, the subset with utility and cost differs in severity from the subset with cost and a clinic score, and the two correlations describe different patient mixes. Van Buuren adds that the method assumes numerical data close to normal, and concludes that it works best when the data approximate a multivariate normal distribution, correlations are low and MCAR is plausible, and is not recommended otherwise.
Why a pairwise matrix can be impossible
A covariance matrix computed from one set of complete observations is always positive semidefinite. It is built from products of the same centred data vectors, so every variance derived from it is non-negative.
where are the variables, is any vector of weights , and is their variance-covariance matrix. The matrix is positive definite when the quantity is strictly positive for every non-zero , which is the same as all its eigenvalues being positive.
A pairwise matrix has no such guarantee, because its cells come from different patients. Van Buuren states that it may not be positive definite, which most multivariate procedures require, and that problems are generally more severe for highly correlated variables. The R documentation for cor warns that pairwise computation can give covariance or correlation matrices that are not positive semi-definite. An indefinite matrix shows up as a negative eigenvalue, a regression with an above one, a partial correlation beyond the range minus 1 to 1, or a failed Cholesky decomposition, which the R documentation for chol defines only for a real symmetric positive-definite matrix.
Sample size and standard errors
A model fitted to the matrix has no single sample size. Van Buuren notes that it is not clear what sample size should be used for calculating standard errors, that taking the average sample size yields standard errors that are too small, and that a proper analysis of the pairwise matrix needs sophisticated optimisation and special formulas. Confidence intervals and fit statistics move with whichever is chosen.
Worked example with cost, utility and a clinic symptom score
All numbers in this example are illustrative. A cohort of 400 patients has annual hospital cost recorded for everyone. A questionnaire utility score is available for 300 patients and a clinic symptom score for 260, and 160 have both, mostly mild cases with little spread in either score.
| Pair | Patients with both values | Pairwise correlation |
|---|---|---|
| Cost and utility | 300 | minus 0.70 |
| Cost and symptom score | 260 | 0.70 |
| Utility and symptom score | 160 | 0.10 |
1. Sample sizes. Cost is complete, so the 160 patients with both scores are the complete cases that listwise deletion would keep. The pairwise cells use 300, 260 and 160 patients, an average of (300 + 260 + 160) / 3 = 240.
2. Determinant. For a 3 by 3 correlation matrix the determinant is 1 minus the sum of the squared correlations plus twice the product of the three correlations. The squares sum to 0.49 + 0.49 + 0.01 = 0.99, and twice the product is 2 × 0.70 × 0.70 × 0.10 = 0.098 with a negative sign, so the determinant is 1 minus 0.99 minus 0.098, which is minus 0.088. A correlation matrix from a single dataset cannot have a negative determinant.
3. Eigenvalues. The vector 0, 1 and 1 on cost, utility and symptom score is an eigenvector with eigenvalue 1 + 0.10 = 1.10, because the two cost correlations of minus 0.70 and 0.70 cancel. The eigenvalues sum to the trace, 3, and multiply to the determinant, so the other two sum to 1.90 and multiply to minus 0.088 / 1.10, or minus 0.080. They solve , giving (1.90 ± √(3.61 + 0.32)) / 2 = (1.90 ± 1.9824) / 2, or 1.9412 and minus 0.0412.
4. Regression of cost on the two scores. With standardised variables, the inverse of the predictor matrix is 1 / 0.99 times the matrix with 1 on the diagonal and minus 0.10 off it. The utility coefficient is therefore minus (0.70 + 0.10 × 0.70) / 0.99 = minus 0.77 / 0.99, or minus 0.7778, and the symptom coefficient is (0.70 + 0.10 × 0.70) / 0.99 = 0.7778. The implied is 0.7778 × 0.70 + 0.7778 × 0.70 = 1.0889, more than all the variation in cost.
5. Partial correlation. The correlation between cost and utility holding the symptom score fixed is minus 0.77 / √((1 − 0.49) × (1 − 0.01)) = minus 0.77 / √0.5049, and 0.77 / 0.7106 = 1.084, so the partial correlation is minus 1.084, outside its possible range.
6. Interpretation. No single group of patients could have produced these correlations, because the utility and symptom cell comes from a mild subgroup and the cost cells from larger, more mixed groups. A cost regression fitted from this matrix, or a probabilistic sensitivity analysis drawing correlated values through a Cholesky factor of it, would fail or give meaningless output.
Repairs and principled alternatives
Software can repair an indefinite matrix. The nearPD function in the R Matrix package computes the nearest positive definite matrix to an approximate correlation or variance-covariance matrix, using the algorithm of Higham. The repaired matrix can be factorised, but bias in cells drawn from unrepresentative subsets remains.
Methods that estimate one coherent matrix from all patients under missing at random address the cause. The lavaan documentation describes a two-stage approach that first estimates the mean vector and variance-covariance matrix with an EM algorithm, then fits the model with standard errors adjusted for the two steps. Direct maximum likelihood estimation and multiple imputation also use every observed value within a single analysis population, and Faria and colleagues consider multiple imputation the most widely applicable method for cost-effectiveness analysis within randomised trials.
Pairwise matrices in health economic evaluation
The ISPOR-SMDM task force report on parameter estimation states that the covariance matrix of regression coefficients defines their uncertainties and can be the basis for probabilistic sensitivity analysis, and recommends that correlation among parameters be considered. Gelman and colleagues, in Bayesian Data Analysis, describe sampling from a multivariate normal distribution through the Cholesky factorisation of its scale matrix. An indefinite pairwise matrix behind the regression can therefore stop the analysis, or pass on standard errors that rest on an arbitrary .
Pairwise deletion beside listwise deletion and available case analysis
Listwise deletion uses one subset of complete cases for every statistic, so its matrix is always internally consistent but may be small and can be biased outside MCAR. Pairwise deletion keeps more data in each cell and gives up that consistency. Available case analysis applies the same principle to separate means of costs and QALYs by trial arm. The missing data mechanism, not the number of values used, decides whether any of these approaches is unbiased.
Common misreadings of pairwise results
These errors recur when pairwise matrices reach published analyses. Each treats the pairwise matrix as if it came from one complete dataset.
- More data per cell means less bias. A larger improves precision within the cell, but bias depends on the missing data mechanism, and the method needs MCAR.
- A matrix that inverts is a valid matrix. A positive definite pairwise matrix can still combine cells from incompatible subsets, and repair by nearPD hides indefiniteness without removing its cause.
- One sample size describes the analysis. Standard errors based on the average are too small, and whichever is used is a choice that should be stated.
- A correlation table and a regression in one report use the same patients. A pwcorr table in Stata is pairwise by default while correlate is listwise, so reporting for every cell shows the difference.
Sources
- Briggs AH, Weinstein MC, Fenwick EAL, Karnon J, Sculpher MJ, Paltiel AD. Model parameter estimation and uncertainty analysis: a report of the ISPOR-SMDM Modeling Good Research Practices Task Force Working Group-6. Medical Decision Making. 2012;32(5):722-732. https://doi.org/10.1177/0272989X12458348
- Faria R, Gomes M, Epstein D, White IR. A guide to handling missing data in cost-effectiveness analysis conducted within randomised controlled trials. PharmacoEconomics. 2014;32(12):1157-1170. https://doi.org/10.1007/s40273-014-0193-3
- Gelman A, Carlin JB, Stern HS, Dunson DB, Vehtari A, Rubin DB. Bayesian Data Analysis. 3rd ed. CRC Press; 2013. Chapter 13. http://www.stat.columbia.edu/~gelman/book/BDA3.pdf
- lavaan package. lavOptions: lavaan Options. Version 0.6-18. Accessed 26 October 2026. https://search.r-project.org/CRAN/refmans/lavaan/html/lavOptions.html
- Matrix package authors (first version by Oehlschlägel J). nearPD: Nearest Positive Definite Matrix. R package Matrix, version 1.7-0. Accessed 26 October 2026. https://search.r-project.org/CRAN/refmans/Matrix/html/nearPD.html
- R Core Team. chol: The Cholesky Decomposition. R package base, version 4.6.0. Accessed 26 October 2026. https://stat.ethz.ch/R-manual/R-devel/library/base/html/chol.html
- R Core Team. cor: Correlation, Variance and Covariance (Matrices). R package stats, version 4.6.0. Accessed 26 October 2026. https://stat.ethz.ch/R-manual/R-devel/library/stats/html/cor.html
- StataCorp. correlate: Correlations of variables. Stata 19 documentation. College Station, TX: StataCorp; 2025. https://www.stata.com/manuals/rcorrelate.pdf
- van Buuren S. Flexible Imputation of Missing Data. 2nd ed. Boca Raton: Chapman & Hall/CRC; 2018. Section 1.3.2, Pairwise deletion. https://stefvanbuuren.name/fimd/sec-simplesolutions.html
Related Concepts (4)
Library
Publications
1
Bayesian Methods in Health Economics — Gianluca Baio, 1st Edition ed., 2012 (Chapman & Hall / CRC Press)
An overview of Bayesian statistical methods for the analysis of health economic data, covering economic evaluation concepts, statistical cost-effectiveness analysis, Bayesian computation and MCMC, and applied health economic evaluation.
BookView source →
Frequently Asked Questions (6)
What is pairwise deletion?
Pairwise deletion is a missing data method that computes each correlation or covariance from all patients observed on both variables, so sample sizes vary.
Source: van Buuren 2018
How does pairwise deletion use the available data for each calculation?
Each statistic is computed from the patients who have the values that statistic needs, so no patient is dropped just for missing a variable used elsewhere. Van Buuren describes the method as calculating each mean and variance from everyone observed on that variable, and each correlation or covariance from all cases observed on both variables of the pair. The resulting matrix of summary statistics is then passed to a regression, a factor analysis or another modelling procedure. Every off-diagonal cell can therefore rest on its own subset of patients and its own sample size, which should be reported for each cell.
Source: van Buuren 2018
How does pairwise deletion differ from listwise deletion?
Listwise deletion keeps only the patients complete on every variable in the analysis and uses that one subset for every statistic, so its matrix is always internally consistent, although the subset may be small. Pairwise deletion computes each correlation or covariance from the patients observed on that particular pair, which keeps more data in each cell but lets different cells describe different groups of patients. In a cohort where cost is complete but two questionnaire scores are each partly missing, listwise deletion would use only the patients with both scores, while pairwise cells would use larger and differently mixed groups. Van Buuren notes that both methods need data missing completely at random to give unbiased estimates.
Source: van Buuren 2018
What are the advantages and disadvantages of pairwise deletion?
The main advantage of pairwise deletion is that it uses more of the observed data than listwise deletion, because a patient missing one variable still contributes to every pair that does not involve it. Van Buuren sets out several drawbacks. The estimates can be biased if the data are not missing completely at random, and the covariance or correlation matrix may not be positive definite, which most multivariate procedures require. It is also unclear what sample size to use for standard errors, and taking the average pairwise sample size gives standard errors that are too small.
Source: van Buuren 2018
When is pairwise deletion valid?
Van Buuren, citing Little and Rubin, reports that pairwise deletion gives consistent estimates of means, correlations and covariances when data are missing completely at random (MCAR). Under that condition each pair subset is a random subsample, so every cell estimates the same population quantity. If missingness depends on observed information, for example when patients with severe disease return utility questionnaires less often, the pair subsets differ in case mix and the estimates can be biased. Van Buuren adds that the method suits approximately multivariate normal data with low correlations and plausible MCAR, and does not recommend it in other cases.
Source: van Buuren 2018
What are the alternatives to pairwise deletion?
The principled alternatives estimate one coherent set of results from all patients rather than combining cells drawn from different subsets. Multiple imputation fills in missing values from an imputation model, analyses each completed dataset and combines the results, while likelihood-based methods use all the observed data in a single estimation step. Both remain valid when data are missing at random, a weaker condition than the one pairwise deletion needs. For cost-effectiveness analysis within randomised trials, Faria and colleagues consider multiple imputation the most widely applicable method. Listwise deletion is simpler and gives an internally consistent matrix, but it discards incomplete patients and shares the restrictive assumption of pairwise deletion.
Source: Faria et al. 2014
Trust Record
Verified by Dr Darrin Baines
British health economist
Professional identity: darrinbaines.org
Verification date: 27 Oct 2026
Content version: 1.0.1
Canonical Identity
- Persistent URI
- https://healtheconomics.wiki/concept/pairwise-deletion
- Term code
- HE-ES-SA-147
Stable URI · Machine-readable · Resolvable · CC BY 4.0
