This function calculates the Mahalanobis Distance Index (MDI) for a given test score vector, a correlation matrix, and the normative mean. It also computes the p-value and the percentage of the normative population expected to exhibit a more unusual profile.
Value
A list containing:
- mdi_value
The Mahalanobis Distance Index.
- df
Degrees of freedom used in the calculation.
- p_value
The p-value associated with the MDI.
- prev
The percentage of the normative population expected to exhibit a more unusual profile.
Examples
# Example usage with a correlation matrix, test scores, and normative means
R <- diag(4) # Example correlation matrix
x <- c(118, 107, 77, 68)
norm.m <- c(100, 100, 100, 100)
norm.sd <- c(15, 15, 15, 15)
mdi_results <- mdi(R, x, norm.m = norm.m, norm.sd = norm.sd)
print(mdi_results)
#> MAHALANOBIS DISTANCE Index of the overall abnormality of the case's Index score profile:
#>
#> Chi-square = 8.56 on 4 df, p value = 0.0730893
#>
#> Percentage of normative population expected to exhibit a more unusual profile = 7.3089%