hodges_lehmann: One-sample Hodges-Lehmann estimator

View source: R/locationEstimators.R

hodges_lehmannR Documentation

One-sample Hodges-Lehmann estimator

Description

hodges_lehmann calculates the one-sample Hodges-Lehmann estimator of a sample.

Usage

hodges_lehmann(x, na.rm = FALSE)

Arguments

x

a (non-empty) numeric vector of data values.

na.rm

a logical value indicating whether NA values in x and y should be stripped before the computation proceeds. The default is na.rm = FALSE.

Details

The one-sample Hodges-Lehmann estimator for a sample of size n is defined as

med(\frac{X_i + X_j}{2}, 1 ≤ i < j ≤ m).

Value

The one-sample Hodges-Lehmann estimator.

References

\insertRef

HodLeh63estirobnptests

Examples

# Generate random sample
set.seed(108)
x <- rnorm(10)

# Compute one-sample Hodges-Lehmann estimator
hodges_lehmann(x)


s-abbas/robTests documentation built on Feb. 20, 2023, 10:14 a.m.