Search_lambda: Calibration of the hyperparameter

Description Usage Arguments Value Examples

View source: R/Search_lambda.R

Description

Perform a grid search for the tuning hyperparameter

Usage

1

Arguments

Sim

a data frame with two columns named L_h and min_ph_pv, normally generated from the Sim_null function. At least 10000 simulation

lev_res

the level of resolution in the wavelet transform

emp_cov

Empirical covariance matrix of the beta values. It can be computed using several results of the wavelet screening using the betas values for different loci. If missing the function computes an approximation of the covariance matrix, this leads to a loss of power and a more conservative test statistics.

size

number of simulation to be performed

sigma_b

the parameter of the NIG prior used for the Betas computation.

Value

The simulation under the null of the two test statistics used to build the final test (i.e., L_h and min(ph,pv))

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## Not run: 
Y <- rnorm(4000)
Sim <- Simu_null(Y=Y,lev_res = 6,sigma_b = 0.2,size=100000)
lambda <-Search_lambda(Sim,plot=TRUE)

par(mfrow=c(2,1))
pen <- i*0
t1 <- lh+pen*(mph_pv)
muv <- median(t1,na.rm = TRUE)
sdv <- mad(t1,na.rm = TRUE)
hist(t1,nclass= 100,
         main=latex2exp("Histogramm of null using L_h"),xlab = "L_h")
pen <- j
t1 <- lh+pen*(mph_pv)
muv <- median(t1,na.rm = TRUE)
sdv <- mad(t1,na.rm = TRUE)
h <- hist(t1,nclass= 100,
         main=latex2exp("Histogramm of null using T_{S_{lambda}}"),xlab = " T_{S_{lambda}}")
par(mfrow=c(1,1))

## End(Not run)

william-denault/WaveletScreaming documentation built on Jan. 23, 2021, 12:34 p.m.