tau2.coef {subselect} | R Documentation |
Computes the Tau squared index of "effect magnitude". The maximization of this criterion is equivalent to the minimization of Wilk's lambda statistic.
tau2.coef(mat, H=NULL, r=0, indices, tolval=10*.Machine$double.eps, tolsym=1000*.Machine$double.eps)
mat |
the Variance or Total sums of squares and products matrix for the full data set. |
H |
the Effect description sums of squares and products matrix (defined in the same way as the mat matrix). |
r |
the Expected rank of the H matrix. See the Details below. |
indices |
a numerical vector, matrix or 3-d array of integers giving the indices of the variables in the subset. If a matrix is specified, each row is taken to represent a different k-variable subset. If a 3-d array is given, it is assumed that the third dimension corresponds to different cardinalities. |
tolval |
the tolerance level to be used in checks for
ill-conditioning and positive-definiteness of the 'total' and
'effects' (H) matrices. Values smaller than tolval are
considered equivalent to zero. |
tolsym |
the tolerance level for symmetry of the
covariance/correlation/total matrix and for the effects (H )
matrix. If corresponding matrix entries differ by more than this
value, the input matrices will be considered asymmetric and execution
will be aborted. If corresponding entries are different, but by less
than this value, the input matrix will be replaced by its symmetric
part, i.e., input matrix A becomes (A+t(A))/2. |
Different kinds of statistical methodologies are considered within the framework, of a multivariate linear model:
X = A B + U
where X is the (nxp) data matrix of original variables, A is a known (nxp) design matrix, B an (qxp) matrix of unknown parameters and U an (nxp) matrix of residual vectors. The tau^2 index is related to the traditional test statistic (Wilk's lambda statistic) and measures the contribution of each subset to an Effect characterized by the violation of a linear hypothesis of the form C B = 0, where C is a known cofficient matrix of rank r. The Wilk's lambda statistic (λ) is given by:
Lambda = det(E)/det(T)
where E is the Error matrix and T is the Total matrix. The index tau^2 is related to the Wilk's lambda statistic (Lambda) by:
tau^2 = 1 - λ^{(1/r)}
where r is the rank of H the Effect matrix.
The fact that indices
can be a matrix or 3-d array allows for
the computation of the tau^2 values of subsets produced by the search
functions anneal
, genetic
, improve
and
leaps
(whose output option $subsets
are
matrices or 3-d arrays), using a different criterion (see the example
below).
The value of the tau2 coefficient.
Duarte Silva, A.P. (2001) Efficient Variable Screening for Multivariate Analysis, Journal of Multivariate Analysis, Vol. 76, 35-62.
## --------------------------------------------------------------- ## 1) A Linear Discriminant Analysis example with a very small data set. ## We considered the Iris data and three groups, ## defined by species (setosa, versicolor and virginica). ## Both the 'iris' and the 'iris3' R objects are used, for convenience in ## computing the Total matrix (T=irismat) and the Effects matrix (H=irish). data(iris) data(iris3) irismat <-149*var(iris[,1:4]) weights<-c(49,49,49) irish <- irismat - matrix(weights%*% t(apply(iris3,3,var)),4,4) tau2.coef(irismat,H=irish,r=2,c(1,3)) ## [1] 0.8003044 ## --------------------------------------------------------------- ## 2) An example computing the value of the tau_2 criterion for two ## subsets produced when the anneal function attempted to optimize ## the xi_2 criterion (using an absurdly small number of iterations). xiresults<-anneal(irismat,2,nsol=2,niter=2,criterion="xi2",H=irish,r=2) tau2.coef(irismat,H=irish,r=2,xiresults$subsets) ## Card.2 ##Solution 1 0.8079476 ##Solution 2 0.7907710 ## ---------------------------------------------------------------