multscatter | R Documentation |
The function can be used to compute several scatter matrices for the same data.
multscatter(scatterlist, X, toshape = TRUE)
scatterlist |
a vector with the names of the scatter matrices to be computed. Note that each of these functions should only return a matrix of size p times p. |
X |
the n times p data matrix for which the scatter should be computed. |
toshape |
logical, whether scatter matrices should be converted to shape matrices. If TRUE, all matrices will have determinant 1. |
It is important that the functions do not need any additional imput and that they return only the p times p scatter matrix. Hence it might be sometimes necessary to write wrappers for some of the functions. See examples.
An array of dimension c(p,p,k) where k is the number of scatter matrices.
Klaus Nordhausen
# example requires the packages ICS and ICSNP
library(ICSNP)
X <- cbind(rexp(1000), rt(1000,6), runif(1000))
my.tM1 <- function(X,df=1) tM(X,)$V
my.tM2 <- function(X,df=2) tM(X,)$V
multscatter(c("cov","cov4","HP1.shape","my.tM1", "my.tM2"), X)
multscatter(c("cov","cov4","HP1.shape","my.tM1", "my.tM2"), X, toshape=FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.