pmpv {HCTR}R Documentation

Permutation p-values

Description

Calculates

Usage

pmpv(Y, X, W = NULL, type, B = 100, fold.num = 10, perm.num = 1000)

Arguments

Y

A numeric response vector, containing nobs variables.

X

An input matrix, of dimension nobs x nvars.

W

A covariate matrix, of dimension nobs x ncors, default is NULL.

type

Penalized regression type, valid parameters include "Lasso", "AdaLasso", "SCAD", and "MCP".

B

Multi-split times, default is 100.

fold.num

The number of cross validation folds, default is 10.

perm.num

Permutation times, default is 1000.

Value

A matrix containing harmonic mean p-values from permutation.

Examples

set.seed(10)
X <- matrix(rnorm(20000), nrow = 100)
beta <- rep(0, 200)
beta[1:100] <- 5
Y <- MASS::mvrnorm(n = 1, mu = X%*%beta, Sigma = diag(100))
result <- pmpv(Y=Y, X=X, type = "Lasso", B = 2, fold.num = 10, perm.num = 10)

[Package HCTR version 0.1.1 Index]