View source: R/acc_mahalanobis_ratio.R
| acc_mahalanobis_ratio | R Documentation |
Please use instead the function acc_mahalanobis()
Indicator
acc_mahalanobis_ratio(
resp_vars = NULL,
study_data,
label_col = VAR_NAMES,
item_level = "item_level",
meta_data = item_level,
meta_data_v2,
meta_data_cross_item = "cross-item_level",
cross_item_level,
`cross-item_level`
)
resp_vars |
variable the names of the computed variable
containing |
study_data |
data.frame the data frame that contains the measurements |
label_col |
variable attribute the name of the column in the metadata containing the labels of the variables |
item_level |
data.frame the data frame that contains metadata attributes of study data |
meta_data |
data.frame old name for |
meta_data_v2 |
character path or file name of the workbook like
metadata file, see
|
meta_data_cross_item |
data.frame – Cross-item level metadata |
cross_item_level |
data.frame alias for |
`cross-item_level` |
data.frame alias for |
a list with:
SummaryData: data.frame underlying the plot with user friendly caption
SummaryTable: data.frame underlying the plot
SummaryPlot: ggplot2::ggplot2 Q-Q plot of squared Mahalanobis
distances vs. a theoretical
chi-squared distribution showing outliers.
FlaggedStudyData data.frame contains the original data frame of the
variables used to calculate
the squared Mahalanobis distances
with an additional column indicating if
for a group of variables if the
observational unit is a
multivariate outlier.
Implementation is restricted to variables of type integer
Remove missing codes from the study data (if defined in the metadata)
The covariance matrix is estimated for all variables of resp_vars
The Mahalanobis distance of each observation is calculated
MD^2_i = (x_i - \mu)^T \Sigma^{-1} (x_i - \mu)
The default to consider a value an outlier is to use the 0.975 quantile
of a theoretical chi-square distribution with degrees of freedom
equals to the number of variables used to calculate the
Mahalanobis distance (Mayrhofer and Filzmoser, 2023)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.