Spatial location {SpatialNP}R Documentation

Multivariate location estimates based on spatial signs and signed ranks

Description

Spatial median, multivariate Hodges-Lehmann estimate of location and their affine equivariant versions

Usage


ae.hl.estimate(X, init=NULL, shape=TRUE, maxiter = 500, eps = 1e-6,
na.action = na.fail)

spatial.location(X, score = c("sign", "signrank"), init = NULL, shape
= TRUE, maxiter = 500, eps = 1e-6, na.action = na.fail) 

Arguments

X a matrix or a data frame
score a character string indicating which transformation of the observations should be used
init an optional vector giving the initial point of the iteration
shape logical, or a matrix. See details
eps tolerance for convergence
maxiter maximum number of iteration steps
na.action a function which indicates what should happen when the data contain 'NA's. Default is to fail.

Details

Hodges-Lehmann estimate of multivariate location is the spatial median (see spatial.median) of the observations and their pairwise averages. Since spatial median is not affine equivariant, neither is multivariate Hodges-Lehmann estimate. Affine equivariance can be achieved by simultaneously estimating the corresponding shape, as proposed for the spatial median by Hettmansperger and Randles (2002). For spatial median the corresponding shape is tyler.shape and the simultaneous estimation is implemented as HR.Mest, see its documentation for further details on the algorithm. For the Hodges-Lehmann estimate it is rank.shape.

spatial.location is a wrapper function for a unified access to both location estimates. The choice of estimate is done via score:

  • "sign" for spatial median
  • "signrank" for Hodges-Lehmann estimate

    If a matrix (must be symmetric and positive definite, but this is not checked) is given as shape the location estimate is found with respect to that shape and no further shape estimation is done. If a logical TRUE is given as shape the shape is estimated and consequently the affine equivariant version of the location estimate is found. If shape is FALSE then shape estimation is not done and the non affine equivariant version of the location estimate is found.

    Value

    The estimate vector with the (final estimate of or given) shape matrix as attribute "shape".

    Author(s)

    Seija Sirkia, ssirkia@maths.jyu.fi

    References

    Hettmansperger, T. and Randles, R. (2002) A Practical Affine Equivariant Multivariate Median, Biometrika, 89, pp. 851-860

    See Also

    spatial.median, HR.Mest signrank.shape

    Examples

    A<-matrix(c(1,2,-3,4,3,-2,-1,0,4),ncol=3)
    X<-matrix(rt(150,1),ncol=3)%*%t(A)
    spatial.location(X,score="signrank")
    spatial.location(X,score="sign")
    #compare with:
    colMeans(X)
    ae.hl.estimate(X,shape=A%*%t(A))
    ae.hl.estimate(X,shape=FALSE)
    

    [Package SpatialNP version 0.9 Index]