I am trying to perform t-tests and ANOVAs on numerical parameters (eg. bone density) comparing groups. t-tests will be applied to a 2-group grouping method, and ANOVAs will be used when I hope to analyze in a 3-group manner. I want to adjust the parameter (bone density) taking another numerical parameter into consideration (eg. blood pressure). I have been able to compute the adjusted mean for the groups and p-values after adjustment. However, I am a little confused about whether I would be able to get the individual adjusted values. Is this linear regression process manipulating the mean or each individual value? I would greatly appreciate any input!

  • 1
    $\begingroup$ Welcome to CV, brothy. It's impossible to know how to answer because you haven't told us how you computed "adjusted" values or what exactly you mean by "getting" the adjusted values. Maybe you could supply some details and/or a small example? $\endgroup$
    – whuber
    Mar 14 at 22:58
  • $\begingroup$ @whuber Thanks! I was using lm() function in R to obtain a linear regression adjusted value. Essentially through this line of code: summary(lm(df\$bonedensity ~ df\$TWOGROUP + df\$bloodpressure)). The two groups here are Control Participants and Diabetic Participants. R output intercept value as well as df\$TWOGROUP. I took the intercept value as the adjusted Control group mean, and intercept+df\$TWOGROUP value as the Diabetic mean. Please let me know if I can elaborate further. I have also tried using the general linear model (univariant) with blood pressure as a covariant. $\endgroup$ Mar 15 at 0:25

1 Answer 1


In a regression of an outcome on treatment group and a covariate, the intercept generally does not correspond to the reference group mean. It is an estimate of the reference group mean when the covariate is equal to 0, which may not be a meaningful value, and is only such under certain assumptions that may not be true (i.e., parallel regression lines or perfectly balanced groups). Instead, you should center the covariate (blood pressure) at its mean, and include an interaction between group and the centered covariate. This correctly adjusts for the covariate (though still assumes the relationship is linear) and allows for the desirable interpretation of the intercept and group coefficients.

So, you might run a regression like the following:

cen <- function(x) {x - mean(x)}

lm(bonedensity ~ group * cen(bloodpressure), data = df) |>

From this, the intercept is equal to the adjusted control group mean and the coefficient on group (if there are only two groups) is equal to the difference between the adjusted treatment group mean and the adjusted control group mean. There is no need to interpret any other coefficients if you are only interested in adjusting the treatment effect estimates. For three groups, you should do exactly the same.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.