I have a paired-dataset of pre and post-surgery measurements of certain biomarkers. I have done a paired t-test to find if there is a difference in the levels of a biomarker, say x1, before and after surgery. but this biomarker is correlated with another biomarker x2. so how do I adjust the effect of x2 on x1.
I'm a newbie but here are some suggestions.
You could make your data long by stacking before and after on top of each other, add another variable that identifies before from after and an id variable that identifies the pairs. Then use X1 as the outcome and the new before/after variable as the predictor along with x2. Use a gee model specify the id variable in a repeated statement.
Instead of a t-test, use a regression model. You could use X1 after as your dependent variable with X1 before and X2 as predictors. See if X1 after is still related to X1 before after controlling for X2.
Calculate a difference score, test to see if your difference is significantly different from 0 after controlling for x2. I think the significance of the intercept would be the term to look at.