Abstract
By using generalized estimating equation, random intercept model, random coefficients model, and generalized linear model respectively, this study obtained residuals for predictors and outcomes as new predictors and outcomes for multivariate random forest (MRF) analysis. Simulation experiments were conducted to compare the performance of these methods in confounding adjustment under scenarios with varying outcome correlations, causal effect magnitudes, numbers of confounding factors, and sample sizes. United Kingdom Biobank data were used for further validation. Simulation results showed that conventional MRF failed to control type Ⅰ error, whereas the proposed residual-based MRF effectively controlled type Ⅰ error. Notably, the residual strategy based on generalized estimating equation achieved the best performance in identifying important predictors, especially when outcomes were highly correlated. As the number of confounding factors increased, the performance of all the methods declined but remained effective when the causal effect was sufficiently large. With the increase of sample size, the performance of the residual-based MRF became more stable, and the proportion of identifying the true causal predictor as the top variable reached 100%. The United Kingdom Biobank analysis also supported the effectiveness of the residual strategy in adjusting for confounding effect in real-world data.</p>