Description Usage Arguments Details Value References See Also Examples
Performs a Monte Carlo simulation to estimate the distribution of the null thresholding statistic required for computation of the quantile universal threshold, and computes its upper alphaquantile if alpha is provided.
1 2 3 4 
X 
input matrix of dimension 
q 
size of noise dictionaries. A noise dictionary consists in a
Gaussian matrix G of size 
M 
number of noise dictionaries used. 
alpha 
level of the quantile universal threshold. By default

sigma 
standard deviation of the noise. If 
intercept 
if 
standardizeX 
whether the columns of 
standardizeG 
either a positive numerical value indicating the desired
Euclidean norm of all columns of the noise dictionaries, or a logical value
indicating whether the columns of the noise dictionaries should be
standardized to have unit standard deviation. If 
MCrep 
number of Monte Carlo replications. Default is 
GEVapprox 
whether to approximate the distribution of the null
thresholding statistic by a GEV distribution. If 
parallel 
if 
var.subset 
subset of variables for which QUT is computed (i.e. we will compute the parameter value for which P(betahat[var.subset]) = 0) = 1alpha when beta = 0. 
If the noise level sigma
is known, the statistic of interest is simply
the supnorm of the LassoZero coefficients obtained under the null
hypothesis (i.e. when all coefficients all zero) when the threshold
tau
is set to 0, and its upper alphaquantile is the quantile
universal threshold. If sigma = NULL
(sigma unknown) a pivotized
statistic is used, which is obtained by dividing the statistic described
above by the MAD of all nonzero noise coefficients obtained by LassoZero.
An object of class "qut.MC"
, which is a list with the
following components:
allMC 
all 
GEVpar 
MLE estimates of the GEV distribution parameters
( 
GEVfit 
set to NULL is GEVapprox is FALSE. If GEVapprox is TRUE, GEVfit is either the result of the gev.fit function, or the character string "error" if gev.fit produced an error. 
upperQuant 
upper alphaquantile of the null thresholding statistis (either the empirical quantile, or the quantile of the fitted GEV distribution). 
call 
matched call. 
lass0settings 
a list
containing the chosen settings for the computation of lassozero: 
Descloux, P., & Sardy, S. (2018). Model selection with lassozero: adding straw to the haystack to better find needles. arXiv preprint arXiv:1805.05133. https://arxiv.org/abs/1805.05133
Giacobino, C., Sardy, S., DiazRodriguez, J., & Hengartner, N. (2017). Quantile universal threshold. Electronic Journal of Statistics, 11(2), 47014722.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39  ### Fast toy example with 5x10 input matrix and a small number (MCrep = 50)
### of Monte Carlo replications.
### Illustrates how to tune LassoZero with QUT for the same input matrix but
### different responses and/or different alpha values, without calling
### qut.MC several times:
### (for faster computation when X and MCrep are larger: register a parallel
### backend and choose parallel = TRUE when calling lass0 and qut.MC functions.)
set.seed(3)
## input matrix:
n < 5
p < 10
X < matrix(rnorm(n*p), n, p)
## two sparse vectors and corresponding responses:
S1 < 1:2 # first support
beta1 < numeric(p)
beta1[S1] < 5
y1 < X[, S1] %*% beta1[S1] + rnorm(n)
S2 < 3:4 # second support
beta2 < numeric(p)
beta2[S2] < 5
y2 < X[, S2] %*% beta2[S2] + rnorm(n)
## Monte Carlo simulation giving empirical distribution for the statistic P (see paper below):
qut.MC.output < qut.MC(X, parallel = FALSE, MCrep = 50)
## lassozero estimates:
## for y1 with alpha = 0.1:
lass01 < lass0(X, y1, alpha = 0.1, qut.MC.output = qut.MC.output, parallel = FALSE)
plot(lass01)
## for y2 with alpha = 0.05:
lass02 < lass0(X, y2, alpha = 0.05, qut.MC.output = qut.MC.output, parallel = FALSE)
plot(lass02)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.