Description Usage Arguments Value Author(s) References See Also Examples
Compute a sequence of default smoothing parameters covering the minimum (sparsest) and a user specified maximum, plus infinity (densest).
1 | smrppInitSpar(dp.dw, max.ratio=2, nspar=100L, denseProp= .25)
|
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 |
max.ratio |
A positive numeric scalar. Let |
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) |
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.
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 | 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
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.