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_classification_coef(X, Y, Yk, nlambda = 100, standardize = TRUE)

Arguments

X

n-by-p matrix of qualitative predictors.

Y

n-by-r matrix of original responses.

Yk

n-by-r matrix of knockoff responses.

nlambda

The number of lambda values - default is 100.

standardize

Logical flag for Y variable standardization. Default is standardize=TRUE.

Value

A r-by-2 matrix of statistics \(Z\).

Details

This function uses the glmnet package to fit a generalized linear model via penalized maximum likelihood.

The statistics \(W_j\) are constructed by taking the difference between the coefficient of the j-th responses and its knockoff. '

The optional nlambda parameter can be used to control the granularity of the grid of \(\lambda\)'s. The default value of nlambda is 100.