MTD {singcar} | R Documentation |
Multivariate Test of deficit
Description
Testing for abnormality in the distance between a a vector of observations for a single case and a vector of population means. Please see vignette for further details.
Usage
MTD(
case,
controls,
conf_level = 0.95,
method = c("pd", "pchi", "pf", "pmd"),
mahalanobis_dist = NULL,
k = NULL,
n = NULL
)
Arguments
case |
Vector of case scores |
controls |
Matrix or data frame with scores from the control sample, each column representing a variable |
conf_level |
Level of confidence for the confidence intervals |
method |
One out of "pd", "pchi", "pf" and "pmd". Use "pmd" if the Mahalanobi's distance seems suspiciously small |
mahalanobis_dist |
Mahalanobi's distance of the case if summary statistics are used |
k |
The number of dimensions, if summary statistics are used |
n |
The size of the control sample |
Value
A list with class "htest"
containing the following components:
statistic | Hotelling's T^2 statistic for the case's Mahalanobi's distance |
p.value | The p value associated with the Hotelling statistic |
estimate | Estimates of the case Mahalanobis distance and index as well as abnormality |
interval | List of interval measure for the estimates |
sample.size | number of controls. |
method | a character string indicating what type of test was performed and which abnormality measure used |
Examples
caseA <- size_weight_illusion[1, "V_SWI"]
contA <- size_weight_illusion[-1, "V_SWI"]
caseB <- size_weight_illusion[1, "K_SWI"]
contB <- size_weight_illusion[-1, "K_SWI"]
MTD(case = c(caseA, caseB), controls = cbind(contA, contB),
conf_level = 0.95, method = c("pd", "pchi", "pf", "pmd"),
mahalanobis_dist = NULL, k = NULL, n = NULL)
[Package singcar version 0.1.5 Index]