stat_modelY_maxlam.Rd
Computes the signed maximum statistic $$W_j = \max(Z_j, \tilde{Z}_j) \cdot \mathrm{sgn}(Z_j - \tilde{Z}_j),$$ where \(Z_j\) and \(\tilde{Z}_j\) are the maximum values of \(\lambda\) at which the jth variable and its knockoff, respectively, enter the generalized linear model.
stat_modelY_maxlam(
X,
Y,
Yk,
generate_lambda = TRUE,
nlambda = 100,
standardize = TRUE
)
n-by-p matrix of quantitative predictors.
n-by-r matrix of original responses.
n-by-r matrix of knockoff responses.
whether to use the method in the YKnock paper to generate lambda sequence. If not, it will use the method of glmnet package to generate lambda.
The number of lambda values - default is 100.
Logical flag for Y variable standardization. Default is standardize=TRUE
.
A r-by-2 matrix of statistics \(Z\).
This function uses glmnet
to compute the regularization path
on a fine grid of \(\lambda\)'s.