Skip to content

Methods · Machine learning · Tree ensembles

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)

When to use something else

Assumptions and requirements

What the analysis reports

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

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.

Method ID Q71175 · Reviewed 2026-10-25