Description Usage Arguments Details Value Author(s) References See Also Examples
This function solves the penalized optimization problem by minimizing an approximation of weighted MRPP p-values subject to constraints on the size of weight adjustment, total weight and nonnegativity of weights.
1 | smrpp.penWt(dp.dw, spar, simplify=TRUE)
|
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 |
spar |
A nonnegative numeric vector of smoothing parameters, or a matrix. If it is a matrix, |
simplify |
A logical scalar. If |
Let lambda
be a smoothing parameter under consideration (e.g., one value of spar
) and Ir
be a vector of derivatives of MRPP p-value to the weights (e.g., a row of dp.dw
).
This function finds w
that minimizes sum(Ir * w) + lambda * sum(w * w)
subject to the constraints all(w>=0)
and sum(w)==R
, where R
is the total number of variables.
When dp.dw
is a vector, it is converted to a single-row matrix. The result is then a 3D array with dim
being c(L, B, R)
,
where L
is the number of smoothing parameters, B
is the number of rows of dp.dw
, and R
is the number of variables.
If simplify=TRUE
, this array is passed to drop()
before being returned.
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 | set.seed(2340L)
dp.dw=runif(10L, -1, 1) # some fake derivatives
spar=smrppInitSpar(dp.dw, max.ratio=2, nspar=5L) # a vector of smoothing parameters
smrpp.penWt(dp.dw, spar, TRUE) # a matrix of weights, with rows of decreasing sparseness
smrpp.penWt(dp.dw, spar, FALSE) # the same result without dropping the 2nd array dimension
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.