hl.loc: Hodges - Lehmann Estimator of Location

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/hl.loc.R

Description

Function to compute the Hodges - Lehmann estimator of location in the one sample case.

Usage

1

Arguments

x

a numeric vector.

na.action

a function which indicates what should happen when the data contain 'NA's. Default is to fail.

Details

The Hodges - Lehmann estimator is the median of the combined data points and Walsh averages. It is the same as the Pseudo Median returned as a by-product of the function wilcox.test.

Value

the Hodges - Lehmann estimator of location.

Author(s)

Klaus Nordhausen

References

Hettmansperger, T.P. and McKean, J.W. (1998), Robust Nonparametric Statistical Methods, London, Arnold.

Hodges, J.L., and Lehmann, E.L. (1963), Estimates of location based on rank tests. The Annals of Mathematical Statistics, 34, 598–611.

See Also

wilcox.test

Examples

1
2
3
4
5
6
set.seed(1)
x <- rt(100, df = 3)
hl.loc(x)
# same as
wilcox.test(x,  conf.int = TRUE)$estimate
rm(.Random.seed)

Example output

Loading required package: mvtnorm
Loading required package: ICS
[1] -0.04253799
(pseudo)median 
   -0.04251537 

ICSNP documentation built on March 18, 2018, 2:15 p.m.