Iterative algorithms to find shape matrices based on spatial signs and ranks and the kstep versions of these.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 
spatial.shape(X, score = c("sign", "symmsign", "rank", "signrank"),
fixed.loc = FALSE, location = NULL, init = NULL, steps = Inf,
eps = 1e06, maxiter = 100, na.action = na.fail)
signs.shape(X, fixed.loc = FALSE, location = NULL, init = NULL,
steps = Inf, eps = 1e6, maxiter = 100, na.action = na.fail)
symmsign.shape(X, init = NULL, steps = Inf, eps = 1e6,
maxiter = 100, na.action = na.fail)
rank.shape(X, init = NULL, steps = Inf, eps = 1e06,
maxiter = 100, na.action = na.fail)
signrank.shape(X, fixed.loc = FALSE, location = NULL, init = NULL,
steps = Inf, eps = 1e06, maxiter = 100, na.action = na.fail)

X 
a matrix or a data frame 
score 
a character string indicating which transformation of the observations should be used 
fixed.loc 
a logical, see details 
location 
an optional vector giving the location of the data or the initial value for the location if it is estimated 
init 
an optional starting value for the iteration 
steps 
fixed number of iteration steps to take, if 
eps 
tolerance for convergence 
maxiter 
maximum number of iteration steps. Ignored if 
na.action 
a function which indicates what should happen when the data contain 'NA's. Default is to fail. 
sign.shape
(Tyler's shape matrix), symmsign.shape
(Duembgen's shape matrix), rank.shape
and signrank.shape
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
:
"sign"
for signs.shape
"symmsign"
for symmsign.shape
"rank"
for rank.shape
"signrank"
for signrank.shape
signrank.shape
and sign.shape
include options to compute the shape matrix either with respect to fixed location (fixed.loc = TRUE
) or so that the location and the shape are estimated simultaneously (fixed.loc = FALSE
).
The estimate matrix with the (final estimate of or given) location vector
as attribute "location"
.
Seija Sirkia, seija.sirkia@iki.fi, Jari Miettinen, jari.p.miettinen@jyu.fi
Oja, H., Randles R. (2004) Multivariate Nonparametric Tests. Statistical Science 19, 598605.
Sirkia et al. (2009) Tests and estimates of shape based on spatial signs and ranks. Journal of Nonparametric Statistics, 21, 155176.
Sirkia, S., Taskinen, S., Oja, H. (2007) Symmetrised Mestimators of scatter. Journal of Multivariate Analysis, 98, 16111629.
tyler.shape
, duembgen.shape
, also spatial sign and rank covariance matrices and spatial signs and ranks
1 2 3 4 5 6 7 8 9  A<matrix(c(1,2,3,4,3,2,1,0,4),ncol=3)
X<matrix(rnorm(1500),ncol=3)%*%t(A)
symmsign.shape(X)
to.shape(symmsign.shape(X),trace=3)
spatial.shape(X,score="sign")
spatial.shape(X,score="sign",fixed.loc=TRUE)
to.shape(A%*%t(A))
# onestep shape estimate based on spatial ranks and covariance matrix:
spatial.shape(X,score="rank",init=cov(X),steps=1)

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
Please suggest features or report bugs with the GitHub issue tracker.
All documentation is copyright its authors; we didn't write any of that.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.