Skip to content

ADescribe · Guide test 306

Jamshidian–Jalal missingness tests

Use distributional or covariance comparisons across missingness patterns to assess MCAR under stated assumptions.

Runs in CodeSplashPython (calls R) example not runR example validated

Do it in CodeSplash

In the app, set it up in Analyze with this method:

In Missing-data patterns and MCAR tests, choose MCAR tests = All three or choose MCAR tests = Jamshidian–Jalal (Hawkins + nonparametric test).

Do it in CodeSplash Run this test on your own data, in Python or R.

Bench

Change the design, drag the data, move α. The statistic, its reference distribution and the verdict follow.

Bench · Jamshidian–Jalal test

120
3
0.50

Missingness mechanism

0.20
1.20

How strongly the driver moves the chance of a value going missing.

0.050

Your data

Simulated with a known mechanism
x1x2x3smallest x₁largest x₁ →

Missing per variable: x1 0 · x2 34 · x3 31. Mean x₁ where a value is missing: 0.44; in complete rows: −0.33. Under MCAR the two agree up to chance.

If H₀ were true

A² = 3.74
  1. The reference: how A² varies across samples when H₀ is true, 199 relabelings of the patterns (permutation null on the shared stream).
  2. Your statistic, from the data above.
  3. The p-value: the area at least as extreme as yours (p = .300).
  4. The hatched rejection region at α = .050: statistics landing here reject H₀.

The formula

AkN2=1N∑k1nk∑jhj (NMkj−nkHj)2Hj(N−Hj)A^2_{kN}=\frac1N\sum_{k}\frac1{n_k}\sum_{j}\frac{h_j\,(NM_{kj}-n_kH_j)^2}{H_j(N-H_j)}

With your numbers

A2=3.74,g=4 patterns,199 permutations (Hawkins p=0.56)A^2 = 3.74,\quad g = 4\text{ patterns},\quad 199\text{ permutations}\ (\text{Hawkins } p = 0.56)
AkN2A^2_{kN}
Scholz–Stephens k-sample Anderson–Darling statistic on the Hawkins F values
Mkj, HjM_{kj},\ H_j
counts at or below each distinct value, in pattern k and overall

The verdict

A² = 3.74, p = .300

p > α = .050: compatible with H₀

With Hawkins' test it splits outcomes: both reject, likely not MCAR; only Hawkins rejects, likely non-normal data that may still be MCAR.

Statistic
3.742
p-value
0.3000
Jamshidian–Jalal test on 120 rows × 3 variables, 65 values missing (MAR): A² = 3.74, p = .300. The p-value is above α = .050, so the data are compatible with H0.

Jamshidian–Jalal test on 120 rows × 3 variables, 65 values missing (MAR): A² = 3.74, p = .300. The p-value is above α = .050, so the data are compatible with H₀.

Question and hypotheses

H0: missingness-pattern groups have homogeneous covariance under the procedure’s model, a necessary implication used to assess MCAR.

Assumptions

Independent observations, sufficient pattern sizes, identifiable covariance and a justified imputation procedure; the nonparametric branch relaxes multivariate normality.

Formula

AG2=∑gng∫[Fg(z)−H(z)]2H(z)[1−H(z)] dH(z)A_G^2=\sum_g n_g\int\frac{[F_g(z)-H(z)]^2}{H(z)[1-H(z)]}\,dH(z)

Parameters and notation

Compute Hawkins-type transformed residual distances after imputation (entry 305); Fg are their pattern-specific empirical CDFs,H pooled CDF. Compare across groups with the k-sample Anderson–Darling statistic.

Structure of the method

Follow the Jamshidian–Jalal missingness-pattern workflow: impute under the selected procedure, construct transformed residual distances and compare their group distributions using the specified nonparametric homogeneity test when normality is doubtful. The automatic branch combines diagnostic decisions rather than implementing one universally model-free MCAR statistic.

Estimated and nuisance parameters

Estimated quantities include imputation parameters, group means/covariances and empirical transformed-distance distributions. Missingness patterns are observed grouping variables; thresholds for deleting sparse patterns and choosing calibration are design settings, not nuisance parameters learned from an objective.

Settings and design choices

State method="Auto" versus a forced branch, imputation.method, imputation.number, nrep, n.min and del.lesscases. In the documented implementation, patterns with at most the deletion threshold are omitted. List omitted rows/patterns because a favorable result on the retained subset does not describe all original observations.

Fitting and adaptation

Reproduce imputation, transformation and group comparison together. More imputations can reveal instability and diagnostic contributors, but selecting only favorable imputations is invalid. A new dataset may need different scientifically justified modeling or sensitivity analysis; neural fine-tuning terminology does not apply.

Sensitivity and robustness

The nonparametric branch relaxes normality, not every independence or covariance-identifiability assumption. Equal observed-pattern covariance is insufficient to prove MCAR. Sparse patterns, collinearity, influential observations and imputation choices can change conclusions; report component diagnostics and consider plausible MAR/MNAR analyses independently of the test result.

How to use and calibrate

Use the Jamshidian–Jalal workflow distinguishing Hawkins rejection due to nonnormality from covariance heterogeneity; record imputation method, repetitions and pattern exclusions.

Example application

Investigate MCAR compatibility when multivariate normality is doubtful.

Interpretation and pitfalls

Watch out

Equal covariance across observed patterns does not prove MCAR. Arbitrary imputation or ignoring excluded sparse patterns can change the conclusion.

What changed in edition 2

  • New sections: structure of the method, estimated and nuisance parameters, settings and design choices, fitting and adaptation, sensitivity and robustness.

Python and R

Jamshidian–Jalal procedure chooses the documented parametric/nonparametric route. Inspect both the normality/homoscedasticity evidence and final missingness conclusions; 999 replications are illustrative.

Python · invokes R

Not run — Executed end to end through Rscript · needs Python standard library + Rscript; R packages: MissMech

# Python launcher for the complete R implementation below.
# Requires Rscript on PATH and the listed R packages.
import shutil
import subprocess
rscript = shutil.which("Rscript")
if rscript is None:
    raise RuntimeError("Install R and make Rscript available on PATH.")
r_code = r"""
set.seed(2026)
X<-matrix(rnorm(240*4),240,4);X[1:60,1]<-NA;X[61:120,2]<-NA;colnames(X)<-paste0("v",1:4)
print(MissMech::TestMCARNormality(X,method="Auto",imputation.number=1,nrep=999))
"""
# No shell interpolation. A failed R execution raises an error in Python.
result = subprocess.run([rscript, "--vanilla", "-"], input=r_code,
                        text=True, capture_output=True)
print(result.stdout)
if result.stderr:
    print(result.stderr)
result.check_returncode()
R

Validated — Executed successfully in the validation environment · needs MissMech

set.seed(2026)
X<-matrix(rnorm(240*4),240,4);X[1:60,1]<-NA;X[61:120,2]<-NA;colnames(X)<-paste0("v",1:4)
print(MissMech::TestMCARNormality(X,method="Auto",imputation.number=1,nrep=999))
Output
Call:
MissMech::TestMCARNormality(data = X, imputation.number = 1, 
    method = "Auto", nrep = 999)

Number of Patterns:  3 

Total number of cases used in the analysis:  240 

 Pattern(s) used:
          v1   v2   v3   v4   Number of cases
group.1   NA    1    1    1                60
group.2    1   NA    1    1                60
group.3    1    1    1    1               120


    Test of normality and Homoscedasticity:
  -------------------------------------------

Hawkins Test:

    P-value for the Hawkins test of normality and homoscedasticity:  0.7376102 

    There is not sufficient evidence to reject normality
    or MCAR at 0.05 significance level

Sources

  • MissMech — MissMech · TestMCARNormalityAuthor documentation/source reviewed: MissMech 1.0.4.search.r-project.org
  • Jamshidian & Jalal (2010) — Jamshidian & Jalal (2010) · Homoscedasticity, normality and incomplete multivariate datadoi.org
  • TestMCARNormalitysearch.r-project.org
  • s11336-010-9175-3doi.org
Statistics guide v4 (historical):
Python: Executed end to end through Rscript · R: Executed successfully in the validation environment
Reference's record:
Edition 2 review: Python: skip · R: not executed (Rscript unavailable); why not run: Python: Python-to-R bridge; Rscript is unavailable. R code was not executed. Python: Not run in the reference's review: Python-to-R bridge; Rscript is unavailable. R code was not executed. R: Reviewed but not run: R wasn't available to the reference's authors.

From the CodeSplash statistics guide (v4), entry 306, updated from the reference's edition 2 (reviewed 14 November 2026) as STAT306.