Skip to content

Methods · Regression · Specification tests

Utts Rainbow Test for Linearity

The rainbow test checks a linear regression for lack of fit by comparing the fit on all observations with the fit on a central subset. If the model is right, the central data and all data fit equally well; if the true relation curves, the straight line fits the central part much better than the whole range. By default the subset is the half of the observations with the smallest leverage, as Utts proposed; ordering by one regressor is also possible.

레인보 검정은 전체 관측값의 적합과 중심부 부분집합의 적합을 비교해 선형 회귀의 적합 결여를 점검합니다. 모형이 맞다면 중심부와 전체 자료가 똑같이 잘 맞지만, 실제 관계가 휘어 있으면 직선이 전체 범위보다 중심부에서 훨씬 잘 맞습니다. 기본값은 Utts의 제안대로 지렛값이 가장 작은 절반의 관측값을 부분집합으로 쓰며, 한 설명변수 순서로 정렬할 수도 있습니다.

Does my linear regression fit the central part of the data much better than the whole range, signalling a curved relation?

선형 회귀가 전체 범위보다 자료의 중심부에서 훨씬 잘 맞아 곡선 관계를 시사하는지 어떻게 검정합니까?

The method returns the F statistic with its degrees of freedom and p-value, the residual sums of squares and SDs of the full and central fits, the subset rule, a normality check and a residual plot.

When to use Utts Rainbow Test for Linearity

When to use something else

Assumptions and requirements

What the analysis reports

How to report it

The rainbow test using the [value] lowest-leverage observations gave F([value], [value]) = [value], p = [value].

Related methods

How this method is validated

이 방법의 검증 근거

  • Independent computation. 1 reference test compares the results with statsmodels at a stated tolerance of 1e-8.

    독립 계산. statsmodels 대조 참조 시험 1건 통과(허용오차 1e-8).

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 Utts Rainbow Test for Linearity on Quorant

Data you need
a table (CSV or Excel) with an outcome variable and predictor (feature) columns
Price
250 credits for one analysis up to 10,000 rows (complexity level 2); larger or wider data costs more. Optional methodologist review: 1200 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 Q21139 · Reviewed 2026-10-25