Description Usage Arguments Value Examples
View source: R/Search_lambda.R
Perform a grid search for the tuning hyperparameter
1 | Search_lambda(Sim, plot = FALSE)
|
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. |
The simulation under the null of the two test statistics used to build the final test (i.e., L_h and min(ph,pv))
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.