Last data update: 2014.03.03

R: Hodges - Lehmann Estimator of Location
hl.locR Documentation

Hodges - Lehmann Estimator of Location

Description

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

Usage

hl.loc(x, na.action = na.fail)

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, klaus.nordhausen@uta.fi

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

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

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(ICSNP)
Loading required package: mvtnorm
Loading required package: ICS
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/ICSNP/hl.loc.Rd_%03d_medium.png", width=480, height=480)
> ### Name: hl.loc
> ### Title: Hodges - Lehmann Estimator of Location
> ### Aliases: hl.loc
> ### Keywords: nonparametric robust univar
> 
> ### ** Examples
> 
> set.seed(1)
> x <- rt(100, df = 3)
> hl.loc(x)
[1] -0.04253799
> # same as
> wilcox.test(x,  conf.int = TRUE)$estimate
(pseudo)median 
   -0.04251537 
> rm(.Random.seed)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>