Mixed-Effects Random Forest (MERF, Random Intercept)
The method combines a random forest for the mean with a random intercept for each group. It alternates between fitting the forest to the outcome after the current group effects are removed and re-estimating the group effects and the two variance components by their EM updates, so that a flexible predictor and clustered data are handled together.
평균 부분은 랜덤 포레스트로, 집단 차이는 집단별 임의절편으로 다루는 방법입니다. 현재 집단효과를 뺀 결과변수에 포레스트를 적합하는 단계와 집단효과·분산성분을 EM 식으로 다시 추정하는 단계를 번갈아 반복하여, 비선형 예측과 군집 구조를 함께 처리합니다.
Patients are nested in 40 hospitals and the effect of the predictors is clearly non-linear. How much of the variation lies between hospitals, and what does the model predict for a patient in a known hospital?
환자가 40개 병원에 속해 있고 설명변수의 효과가 분명히 비선형입니다. 병원 간 변동은 얼마이며 특정 병원 환자에 대한 예측은 어떻게 됩니까?
The method returns the residual and between-group variances with the intraclass correlation, the estimated intercept of every group, the predictor importances of the forest and the fit with and without the random effects.
When to use Mixed-Effects Random Forest (MERF, Random Intercept)
- Rows are clustered (hospitals, schools, repeated measurements) and the predictors act non-linearly
- Predictions are wanted for groups that are in the data
- A linear mixed model fits poorly but the clustering must still be respected
When to use something else
- The fixed part is linear and coefficients are wanted: use Hierarchical Linear Modeling (HLM)
- Random slopes or correlated random effects are needed: use Generalized Linear Mixed Model (GLMM)
- There is no clustering: use Random Forest
Assumptions and requirements
- Group effects are normal with constant variance and independent of the predictors
- Residuals are normal with constant variance
- Groups have enough observations for their intercepts to be estimated
- The forest is a black box: it gives importances, not coefficients
What the analysis reports
- Residual and between-group variance with the intraclass correlation
- Estimated intercept and posterior standard deviation per group
- Predictor importances of the forest
- Iterations, convergence and the fit with and without the random effects
How to report it
A mixed-effects random forest with [value] trees and a random intercept for [value] groups (N = [value]) gave a between-group variance of [value] and a residual variance of [value] (ICC = [value]).
Related methods
- Random Forest
- Hierarchical Linear Modeling (HLM)
- Gaussian Process Boosting (Tree Boosting with a Gaussian Process)
- Random Forest for Spatially Dependent Data (RF-GLS)
How this method is validated
이 방법의 검증 근거
- Independent computation. 1 reference test compares the results with direct computations (formulas, enumeration or simulation) at a stated tolerance of 2e-4.
독립 계산. 직접 계산(식·열거·모의실험) 대조 참조 시험 1건 통과(허용오차 2e-4).
Tolerances are relative differences (absolute differences for values near zero). R comparisons and reference tests are re-run before each release of the analysis engine.
허용오차는 상대 차이입니다(0 근처 값은 절대 차이). R 대조와 참조 시험은 분석 엔진을 배포할 때마다 다시 돌립니다.
Run Mixed-Effects Random Forest (MERF, Random Intercept) on Quorant
- Data you need
- a table (CSV or Excel) with an outcome variable, predictor (feature) columns and a cluster ID
- Price
- 600 credits for one analysis up to 10,000 rows (complexity level 4); larger or wider data costs more. Optional methodologist review: 2400 credits.
- Checking
- Compared with independent computations
- Before you pay
- A free pre-analysis diagnosis checks your data and gives an exact quote; nothing is deducted until you approve it.