Skip to contents

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.

Usage

mdi(R, x, norm.m, norm.sd, dp = 7)

Arguments

R

A correlation matrix for the tests.

x

A numeric vector of test scores.

norm.m

A numeric vector of normative means.

norm.sd

A numeric vector of normative SDs.

dp

Number of decimal places for rounding in the results. Default is 7.

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%