Learn R Programming

refund (version 0.1-7)

wnet.perm: Permutation test for (naive) elastic net in the wavelet domain

Description

This function assesses statistical significance of a wnet fit by referring the cross-validation criterion to a permutation distribution.

Usage

wnet.perm(y, xfuncs, min.scale, alpha, lambda, covt = NULL, nsplit = 10, nperm = 20, 
         perm.method = c('responses', 'y.residuals', 'x.residuals'), 
         family = "gaussian", ...)

Arguments

y,xfuncs,min.scale, alpha,lambda,covt,family
arguments passed to wnet.
nsplit
number of splits to estimate the true cv.
nperm
number of permutations. The default is set to a very low value in view of the .
perm.method
one of
  • "responses": permute the response vectory.
"y.residuals": permute the residuals upon regressing y ~ covt. "x.residuals": permute the residuals

Value

  • cvthe CV criterion for the real data.
  • cv.permthe CV values for the permuted data.
  • pvaluethe p-value for the permutation test.

item

...

code

wnet

Details

see wcr.perm

References

Ojala, M., and Garriga, G. C. (2010). Permutation tests for studying classifier performance. Journal of Machine Learning Research, 11, 1833--1863. Potter, D. M. (2005). A permutation test for inference in logistic regression with small- and moderate-sized data sets. Statistics in Medicine, 24, 693--708.

See Also

wnet, wcr.perm

Examples

Run this code
n = 200; d = 64

# Create true coefficient function
ftrue = matrix(0,d,d)
ftrue[40:46,34:38] = 1

# Generate random functional predictors, and scalar responses
ii = array(rnorm(n*d^2), dim=c(n,d,d))
iimat = ii; dim(iimat) = c(n,d^2)
yy = iimat %*% as.vector(ftrue) + rnorm(n, sd=.3)

cv.obj <- wnet.perm(yy, xfuncs = ii, min.scale = 4, alpha = 1, nperm = 10)

Run the code above in your browser using DataLab