Last data update: 2014.03.03

R: Multivariate One Sample Location Estimates
mv.1sample.estR Documentation

Multivariate One Sample Location Estimates

Description

Estimates the multivariate location for different score functions and their asymptotic covariance matrices in the one sample case.

Usage

mv.1sample.est(X, score = "identity", stand = "outer", maxiter = 100, 
               eps = 1e-06, na.action = na.fail, ... )

Arguments

X

a numeric data frame or matrix.

score

the score to be used. Possible choices are identity, sign and rank.

stand

the standardization method used. Possible choices are outer and inner.

maxiter

maximum number of iterations. Used only for score = "sign" and score = "rank".

eps

convergence tolerance. Used only for score = "sign" and score = "rank".

...

arguments that can be passed on to functions used for the estimation of location.

na.action

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

Details

For identity scores the location estimate is the regular mean vector. For the spatial sign score it is the spatial median in the outer standardization case and the Hettmansperger-Randles estimate in the inner standardization case. The rank estimate is the spatial Hodges-Lehmann estimator, either regular (stand = "outer") or affine equivariant (stand = "inner").

Computation with outer standardization is faster than with inner standardization and especially the rank version might be slow and memory consuming.

For further details see chapters 3, 5, 6, 7 and 8 of the MNM book.

Value

A list with class 'mvloc' containing the following components:

location

the location estimate as a vector.

vcov

the asymptotic covariance matrix of the location estimate.

est.name

name of the location estimate.

dname

name of the data set.

Author(s)

Klaus Nordhausen

References

Oja, H. (2010), Multivariate Nonparametric Methods with R, Springer.

Nordhausen, K. and Oja, H. (2011), Multivariate L1 Methods: The Package MNM, Journal of Statistical Software, 43, 1-28.

See Also

spatial.sign, spatial.signrank, spatial.median, HR.Mest

Examples

  set.seed(1)
  X <- rmvt(100, diag(c(1, 2, 0.5)), 3)
 
  est.Hot.X <- mv.1sample.est(X)
  est.SS.o.X <- mv.1sample.est(X,"s")
  est.SS.i.X <- mv.1sample.est(X,"s","i")
  est.SR.o.X <- mv.1sample.est(X,"r")
  est.SR.i.X <- mv.1sample.est(X,"r","i")
  
  est.SR.o.X
  summary(est.SR.o.X)
  
  # plotting
   
  plot(est.Hot.X, est.SS.i.X, est.SR.i.X, X)
  # or
  plot(est.Hot.X, est.SS.i.X, est.SR.i.X)

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(MNM)
Loading required package: ICSNP
Loading required package: mvtnorm
Loading required package: ICS
Loading required package: SpatialNP
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/MNM/mv.1sample.est.Rd_%03d_medium.png", width=480, height=480)
> ### Name: mv.1sample.est
> ### Title: Multivariate One Sample Location Estimates
> ### Aliases: mv.1sample.est
> ### Keywords: multivariate nonparametric
> 
> ### ** Examples
> 
>   set.seed(1)
>   X <- rmvt(100, diag(c(1, 2, 0.5)), 3)
>  
>   est.Hot.X <- mv.1sample.est(X)
>   est.SS.o.X <- mv.1sample.est(X,"s")
>   est.SS.i.X <- mv.1sample.est(X,"s","i")
>   est.SR.o.X <- mv.1sample.est(X,"r")
>   est.SR.i.X <- mv.1sample.est(X,"r","i")
>   
>   est.SR.o.X
$location
[1]  0.10149918  0.18201417 -0.07092265

$vcov
              [,1]          [,2]          [,3]
[1,]  0.0177062672 -0.0006065864 -0.0008289701
[2,] -0.0006065864  0.0199135812 -0.0004145597
[3,] -0.0008289701 -0.0004145597  0.0063097509

>   summary(est.SR.o.X)
The spatial Hodges-Lehmann estimator of X is:
[1]  0.1015  0.1820 -0.0709

And has the covariance matrix:
        [,1]    [,2]    [,3]
[1,]  0.0177 -0.0006 -0.0008
[2,] -0.0006  0.0199 -0.0004
[3,] -0.0008 -0.0004  0.0063
>   
>   # plotting
>    
>   plot(est.Hot.X, est.SS.i.X, est.SR.i.X, X)
>   # or
>   plot(est.Hot.X, est.SS.i.X, est.SR.i.X)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>