Value
- statistic
The d^2 statistic
- degrees_freedom
Degrees of freedom of chi-squared distribution
- p_val
P-value of the test
- missing_patterns
Number of missing patterns
Details
This function reproduces the d^2 statistic in equation (5) from [1].
This statistic is used to test for MCAR. Comments reference variables
from vignette("background")
(in brackets) to improve readability and
traceability.
Note
Code is adapted from mcar_test()
from the naniar package
using base R instead of the tidyverse.