A covariate is an observed variable supplied to a statistical or causal model as an input or conditioning variable. In prediction, covariates such as age and comorbidities define the conditional outcome distribution and help estimate its mean. section 4.1.2
The role changes with the question. A predictive model uses covariates to estimate outcomes, while causal analyses use them to compare more comparable patients or adjust an effect estimate. section 4.1.2 section 5.6
Common uses include:
- Predicting an outcome conditional on observed characteristics, such as estimating ICU stay from age and comorbidities. section 4.1.2
- Matching or grouping treated and untreated patients using similar observed characteristics, often through propensity scores. section 5.6
- Adding variables to a difference-in-differences regression to account for observed differences between groups. section 11.4.5
An added covariate in difference-in-differences
A synthetic dataset adds a variable A to the observed outcomes. The effect estimate is then obtained with a model such as Y ~ D*time_points + A, using A alongside treatment and time. section 11.4.5

