Description Usage Arguments Value Author(s) References See Also Examples
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.
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, ...)
|
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 |
B |
A positive integer number of permutations requested. This will only be used when |
permutedTrt |
An optional permutation index matrix. If missing, this will be computed as |
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 |
data |
A data frame in which variables in the formula can be found. |
verbose |
Logical or numeric scalar. Print messages every |
... |
Additional arguments passed to the methods. |
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. |
Long Qu
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.
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 )
#}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.