smrpp.test: Sparse Weighted MRPP Test for One-way Design

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

Description

K-sample sparse MRPP test with penalization. Variable selection is through penalized weighting. The choice of tuning parameter is through minimizing the MRPP p-value, with weighted Euclidean distance. Such a minimum p-value is then used as the final test statistic. The overal significance is through an outer layer of permutations.

Usage

1
2
3
4
5
6
smrpp.test(y, ...)
## Default S3 method:
smrpp.test(y, trt, B=nparts(table(trt)), permutedTrt, wtmethod=0, 
	outerStat=c('WDISCO 1/F','WMRPP P'), eps=1e-8, spar, verbose=TRUE, ...)
## S3 method for class 'formula'
smrpp.test(y, data, ...)

Arguments

y

An N*R data matrix, with rows representing samples and columns representing variables.

trt

A vector of treatment assignments. If missing, the first permutation in permutedTrt will be used as the original treatment assignment. As least one of trt or permutedTrt need to be given.

B

A positive integer number of permutations requested. This will only be used when permutedTrt is missing. This will be overwritten by the ncol(permutedTrt).

permutedTrt

An optional permutation index matrix. If missing, this will be computed as permuteTrt(trt,B). See permuteTrt.

wtmethod

0 or 1, where 0 stands for weighting each treatment group by sample size - 1, and 1 stands for weighting by sample size.

outerStat

A character value specifying which test statistic to use for the outer permutation. 'WDISCO 1/F' uses the weighted DISCO inverse F-statistic. 'WMRPP P' uses weighted MRPP raw p-value.

eps

A small non-negative number, differences below which among permuted test statistics are treated as equal.

spar

A positive numeric vector of smoothing parameters, over which the minimum p-value will be searched for. An Inf will be padded to spar, if it is not already there.

data

A data frame in which variables in the formula can be found.

verbose

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

...

Additional arguments passed to the methods.

Value

An htest object with the following components:

statistic

The observed test statistic (the minimum MRPP p-value).

all.statistics

All permuted test statistics.

weights

The selected weights for each dimension of the response variable.

p.value

The permutation p-value.

parameter

A vector of the number of permutations, the weighting method and the chosen smoothing parameter.

data.name

The character name of the data.

method

A string of test method.

Author(s)

Long Qu

References

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

See Also

smrppInitSpar, smrpp.penWt

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
dat=data.frame(x, trt)
fmla=as.formula(sprintf('cbind(%s)~trt',paste('X',1:5,sep='',collapse=',')))

#\dontrun{
smrpp.test(x, trt, permutedTrt=pmat, wtmethod=0 ) 
smrpp.test(fmla, dat, permutedTrt=pmat, wtmethod=0 )
#}

MRPP documentation built on May 2, 2019, 4:46 p.m.