The goal of HCTR is to create a new searching scheme for the regularization parameter in penalized regression, such as Lasso, adaptive Lasso, SCAD, and MCP.
This is a basic example which shows you how to (1) estimate false null hypothesis proportion, and (2) create a new tuning region for the regularization parameter.
## basic example code
library('HCTR')
# 1. Estimate proportion
set.seed(10)
<- matrix(runif(n = 10000, min = 0, max = 1), nrow = 100)
X <- bounding.seq(p.value = X)
result <- matrix(runif(n = 100, min = 0, max = 1), nrow = 100)
Y <- est.prop(p.value = Y, cn = result)
test # 2. Estimate a new tuning region
set.seed(10)
<- matrix(rnorm(20000), nrow = 100)
X <- rep(0, 200)
beta 1:100] <- 5
beta[<- MASS::mvrnorm(n = 1, mu = X%*%beta, Sigma = diag(100))
Y <- glmnet::cv.glmnet(x = X, y = Y)
fit <- 0.01
pihat <- est.lambda(cv.fit = fit, pihat = pihat, p = ncol(X)) result