back.search: Backward variable selection for the MRPP

Description Usage Arguments Details Value Note Author(s) References See Also Examples

Description

mrppBVS performs backward variable selection for the MRPP. mrppBVS.test nests the backward variable selection within an outer layer of permutations to assess its significance.

Usage

1
2
3
4
5
6
7
8
mrppBVS(y,permutedTrt, 
         importance=c('dp.dw','p.dd.dw'),
         alpha.in, #=if(match.arg(importance)=='dp.dw') 0 else 0.1, 
         alpha.del=0, size.in=0L, stepwise=FALSE, niter=Inf, verbose=TRUE, ...)
mrppBVS.test(y,permutedTrt, Bperm=nperms.permutedTrt(permutedTrt), 
         importance=c('dp.dw','p.dd.dw'),
         alpha.in, alpha.del=0, 
	 size.in=1L, stepwise=FALSE, verbose=TRUE, niter=Inf, ...)

Arguments

y

Numeric data matrix, with columns being variables and rows being observations.

permutedTrt

list of matrices specifying random treatment assignments, computed from permuteTrt.

importance

Either 'dp.dw' or 'p.dd.dw'. The importance measure. 'dp.dw' means the derivative of approximate p-value with respect to weights. 'p.dd.dw' means the permutation p-value using the derivative of Euclidean distance with respect to weights as the new distance measure.

alpha.in

Desired minimally allowable level of importance for selected variables. By default, this is set to 0 if importance='dp.dw'; and 0.1 if importance='p.dd.dw'.

alpha.del

Desired minimally allowable MRPP p-value for excluded variables. If this is set to zero, then even if the MRPP p-value for the deleted variables becomes small, the iterations continue until any other exit criteria is met.

size.in

Minimally allowable number of selected variables. If the number of variables to be kept in the next iteration falls below this number, the iteration terminates.

stepwise

Logical. If TRUE, then only the variables with least importance are removed. Otherwise, all variables with importance less than alpha.in are removed.

niter

Maximum number of iterations.

verbose

Logical or numeric scalar. Print messages every verbose iteration. TRUE is treated as 1. If FALSE, no messages are printed.

Bperm

Number of outer permutations.

...

Additional arguments passed to mrpp.test.dist, get.dp.dw.kde or get.p.dd.dw.

Details

mrppBVS performs backward variable selection for the MRPP. It starts from all ncol(y) response variables, and compute the variable importance measure specified by importance. In each iteration, it deletes a set of least important variables. When stepwise=TRUE, the variables with importance measure equal to the largest variable importance measures will delted. When stepwise=FALSE, variables with importance measure not smaller than alpha.in will be deleted. This process is iterated until the all remaining variables have importance measure not larger than alpha.in, or the MRPP p-value for the deleted variables is not larger than alpha.del, or the number of remaining variables will be smaller than size.in in the next iteration, or the number of remaining variable is zero.

mrppBVS.test performs a permutation test with the test statistic being the MRPP p-value of selected variable from the last iteration of the mrppBVS result. For simplicity, the current implementation assumes that outer permutations (that performs the final test) will be a subset of the inner permutations (that performs variable selection) specified by permutedTrt. Therefore, Bperm will be no larger than ncol(permutedTrt[[1L]]).

Value

For mrppBVS, the result is a list with each component being list of :

iter

The iteration number (starting from 0);

var.idx

The indices of remaining variables at this iteration, in the order of variable importance;

influence

The variable importance measures (multiplied by the number of permutations, if importance is dp.dw) for the remaining variables;

p.value

The raw MRPP p-value for the remaining variables;

deleted.p.value

The raw MRPP p-value for the excluded variables.

In addition, the result also has the attribute 'parameter', which is a list of importance, alpha.in, alpha.del, size.in, stepwise, niter of input parameters, and the attribute 'status', which is a character vector giving the exit status(es).

mrppBVS.test returns an htest object with the last element of the result from mrppBVS, and

statistic

The observed test statistic, i.e., the raw MRPP p-value from the selectd variables.

all.statistics

All test statistics, i.e., the raw MRPP p-values from the selected variables for each permutation.

p.value

The final permutation p-value.

parameter

The same as the parameter attribute of mrppBVS result, converted to numeric.

data.name

The character name of the data.

method

A string of test method.

Note

In the results, the variable importance measures are multiplied by the number of permutations, if importance is dp.dw.

Author(s)

Long Qu

References

Long Qu, Dan Nettleton, and Jack C. M. Dekkers. Relative Variable Importance and Backward Variable Selection for the Multiresponse Permutation Procedure, with Applications to High Dimensional Genomic Data. (Manuscript under review)

See Also

mrpp.test, get.p.dd.dw, get.dp.dw.kde, permuteTrt

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
set.seed(2340)
x=matrix(rnorm(20*5),20)
trt=gl(2,10)
nparts( table(trt))		## 92378 partitions =  choose(20,10)/2
urand.bigz(0,seed=1032940L) # init seed
pmat=permuteTrt(trt, 5e2L)		## use 500 random permutations
mrpp.test(dist(x), trt, permutedTrt=pmat, wtmethod=0 ) ## MRPP for all variables
mrppBVS(x, pmat) ## backward selection of variables

## Not run: 
mrppBVS.test(x, pmat) ## nested permutation test with backward variable selection

## End(Not run)

gitlongor/MRPP documentation built on May 17, 2019, 5:28 a.m.