smrpp.defaultSpar: Default Smoothing parameters for Sparse Weighted MRPP Test

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

Description

Compute a sequence of default smoothing parameters covering the minimum (sparsest) and a user specified maximum, plus infinity (densest).

Usage

1
smrppInitSpar(dp.dw, max.ratio=2, nspar=100L, denseProp= .25)

Arguments

dp.dw

A vector or matrix of derivative of MRPP p-value to the weights. If it is a matrix, each row is treated as a permutation, as returned from get.dp.dw.kde with test=TRUE.

max.ratio

A positive numeric scalar. Let k be the ratio of maximum weight to the minimum weight. When spar increases, k decreases. Whenever k drops below max.ratio, the corresponding spar will be treated as Inf (resulting in k=1)

nspar

An integer no smaller than 3, requesting the number of smoothing parameters to be generated.

denseProp

The requested proportion of spars that keep all variables (but weighted)

Value

smrppInitSpar returns a vector or matrix of smoothing parameters.

When dp.dw is a vector, the result is also a vector. When dp.dw is a matrix, a separate sequence of smoothing parameters will be generated for each row.

In each row, the smoothing parameters are sorted. The smallest (i.e., the first) one is given by

(See reference for the formula)

where i^(1) and i^(2) are the smallest and the 2nd smallest unique dp.dw values for the row, R is the total number of variables, and m_1 is the number of dp.dw values that tie with the smallest value in the row. For each row of the result, the last element is always Inf. The second last element is determined by the max.ratio as described above. Except for the last one, the spacing between successive smoothing parameters are equal on the log10 scale.

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

smrpp.test, smrpp.penWt,

Examples

1
2
3
4
5
6
7
8
9
set.seed(2340L)
dp.dw=runif(10L, -1, 1)  # some fake derivatives
smrppInitSpar(dp.dw, max.ratio=2, nspar=5L) # a vector of smoothing parameters

set.seed(2340L)
dp.dw=matrix(runif(100L, -1, 1),10L,byrow=TRUE)  # some fake derivatives
smrppInitSpar(dp.dw, max.ratio=2, nspar=5L) # a vector of smoothing parameters for each row of dp.dw

smrppInitSpar(dp.dw, max.ratio=2, nspar=3L)[,1L] # getting the minimum of smoothing parameters 

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