smrpp.penWt: Computing Penalized Weights for Sparse Weighted MRPP Test for...

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

Description

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.

Usage

1
smrpp.penWt(dp.dw, spar, simplify=TRUE)

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.

spar

A nonnegative numeric vector of smoothing parameters, or a matrix. If it is a matrix, dp.dw needs also be a matrix with the same number of rows. All computation will be performed for each row separately.

simplify

A logical scalar. If TRUE, the penalized weight will be passed to drop() before being returned.

Details

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.

Value

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.

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.test

Examples

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

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