# Calculate mahalanobis distance (null and alternative MSEs) and statistical power for all MPs in an MSE

Source:`R/Ancillary_Indicators.R`

`PRBcalc.Rd`

Calculate mahalanobis distance (null and alternative MSEs) and statistical power for all MPs in an MSE

## Arguments

- MSE_null
An object of class MSE representing the null hypothesis

- MSE_alt
An object of class MSE representing the alternative hypothesis

- tsd
Character string of data types: Cat = catch, Ind = relative abundance index, ML = mean length in catches

- stat
Character string defining the quantity to be calculated for each data type, slp = slope(log(x)), AAV = average annual variability, mu = mean(log(x))

- dnam
Character string of names for the quantities calculated

- res
Integer, the resolution (time blocking) for the calculation of PPD

- alpha
Probability of incorrectly rejecting the null operating model when it is valid

- plotCC
Logical, should the PPD cross correlations be plotted?

- removedat
Logical, should data not contributing to the mahalanobis distance be removed?

- removethresh
Positive fraction: the cumulative percentage of removed data (removedat=TRUE) that contribute to the mahalanobis distance

## Value

A list object with two hierarchies of indexing, first by MP, second has two positions as described in Probs: (1) mahalanobis distance, (2) a matrix of type 1 error (first row) and statistical power (second row), by time block.