Shape matrices {SpatialNP}R Documentation

Shape matrices based on spatial ranks and signed ranks

Description

Iterative algorithms to find shape matrices based on spatial signs and ranks and the k-step versions of these.

Usage

 

rank.shape(X, init = NULL, steps = Inf, eps = 1e-06, maxiter = 100,
na.action = na.fail)

signrank.shape(X, location = NULL, init = NULL, steps = Inf, eps =
1e-06, maxiter = 100, na.action = na.fail)

spatial.shape(X, score = c("sign", "symmsign", "rank", "signrank"),
location = NULL, init = NULL, steps = Inf, eps = 1e-06, maxiter = 100,
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
location an optional vector giving the location of the data
init an optional starting value for the iteration
steps fixed number of iteration steps to take, if Inf iteration is repeated until convergence (or until maxiter steps)
eps tolerance for convergence
maxiter maximum number of iteration steps. Ignored if steps is finite
na.action a function which indicates what should happen when the data contain 'NA's. Default is to fail.

Details

As tyler.shape for spatial signs and duembgen.shape for spatial symmetrized signs, but for spatial ranks and signed ranks. These are the so called inner standardization matrices of location etc. tests based on spatial signs and ranks. When data is standardized using these matrices the corresponding sign or rank scores will appear “uncorrelated”: the corresponding outer standardization matrices will be proportional to the identity matrix, see examples.

spatial.shape is a wrapper function for a unified access to all four shape estimates. The choice of estimate is done via score:

signrank.shape (and tyler.shape, thus also spatial.shape) requires the location vector with respect to which it is computed. If none is provided, vector of column means is used.

Author(s)

Seija Sirkia, seija.sirkia@iki.fi

See Also

tyler.shape, duembgen.shape, also spatial sign and rank covariance matrices and spatial signs and ranks

Examples

A<-matrix(c(1,2,-3,4,3,-2,-1,0,4),ncol=3)
X<-matrix(rt(150,1),ncol=3)%*%t(A)
signrank.shape(X)
spatial.shape(X,score="sign")
to.shape(A%*%t(A))
# one-step shape estimate based on spatial ranks and covariance matrix:
spatial.shape(X,score="rank",init=cov(X),steps=1)
# effect of inner standardization:
RCov(X)
RCov(X%*%t(chol(solve(rank.shape(X)))))

[Package SpatialNP version 1.00 Index]