Computes the Quantile Universal Threshold for GLM-lasso.
lambdaqut(y, X, family = gaussian, alpha.level = 0.05, M = 1000,
qut.standardize = TRUE, intercept = TRUE, no.penalty = NULL, offset = NULL,
bootstrap=TRUE,beta0=NA,method='lasso',fixbeta0=FALSE)
response variable. Quantitative for family=gaussian
, or family=poisson
(non-negative counts). For family=binomial
should be a factor with two levels.
input matrix, of dimension n x p; each row is an observation vector.
response type (see above). Default is gaussian
.
level, such that quantile \(\tau=(1-\)alpha.level
\()/\gamma\). Default is 0.05.
number of Monte Carlo Simulations to estimate the distribution \(\Lambda\). Default is 1000.
standardize matrix X with a quantile-based standardization. Default is TRUE.
should intercept(s) be fitted (default=TRUE) or set to zero (FALSE).
unpenalized subset of covariates.
a vector of length n
that is included in the linear predictor. Useful for the "poisson" family (e.g. log of exposure time), or for refining a model by starting at a current fit. Default is NULL.
set TRUE if it is desired to bootstrap matrix X when computing the Quantile Universal Threshold (Random scenario). Default is TRUE.
coefficients of the unpenalized covariates for generating the null data for the Quantile Universal Threshold. By default is NA
and it is estimated using the unpenalized covariates and/or the intercept if TRUE.
If it is desired to set beta0
in advance, then it should be a vector of size the number of unpenalized covariates including the intercept if intercept=TRUE
, in the same order. If there are not unpenalized covariates and intercept=TRUE
, then it must be a real number.
objective function for the zero thresholding. Select lasso
for GLM-lasso or sqrtlasso
for Square-root lasso.
used when beta0
is numeric. When TRUE, it does not estimate beta0
for each monte carlo simulation.
value of the Quantile Universal Threshold.
standardized matrix X; Xnew
=X
\(\times\)scale.factor
.
scale factor for Xnew
.
smallest lambda that sets the lasso estimates to the zero vector.
estimated value of the intercept when family is not gaussian
.
C. Giacobino, J. Diaz, S. Sardy, N. Hengartner. Quantile universal threshold for model selection. 2016 Jianqing Fan, Shaojun Guo and Ning Hao. Variance estimation using refitted cross-validation in ultrahigh dimensional regression. Journal of the Royal Statistical Society: Series B. 2012 Stephen Reid, Robert Tibshirani, and Jerome Friedman. A Study of Error Variance Estimation in Lasso Regression. 2013
# NOT RUN {
X=matrix(rnorm(20*200),20,200)
y=rnorm(20)+1
lambda=lambdaqut(y,X,family=gaussian)
# }
Run the code above in your browser using DataLab