m_test_statistic {robnptests} | R Documentation |
Test statistics for the M-tests
Description
m_test_statistic
calculates the test statistics for
tests based on M-estimators.
Usage
m_test_statistic(x, y, psi, k = robustbase::.Mpsi.tuning.default(psi), ...)
Arguments
x |
a (non-empty) numeric vector of data values. |
y |
a (non-empty) numeric vector of data values. |
psi |
kernel used for optimization.
Must be one of |
k |
tuning parameter(s) for the respective kernel function,
defaults to parameters implemented in |
... |
additional arguments |
Details
For details on how the test statistic is constructed, we refer to the
vignette vignette("m_tests")
Value
A named list containing the following components:
statistic |
standardized test statistic. |
estimates |
M-estimates of location for both |
Examples
# Generate random samples
set.seed(108)
x <- rnorm(20); y <- rnorm(20)
# Compute Huber-M-statistic
m_test_statistic(x, y, psi = "huber")