chunlinli / glmtlp

Constrained likelihood estimation and inference with truncated lasso penalty for linear, generalized linear, and Gaussian graphical models.
https://yuyangyy.com/glmtlp/
GNU General Public License v3.0
6 stars 0 forks source link

Not a single variable selected when kappa is large #1

Open yifei-liu-stat opened 1 year ago

yifei-liu-stat commented 1 year ago

I encountered an issue when using glmtlp() for a single run. I got output named integer(0), but neither a warning nor an error was produced. To replicate this issue, run the following codes:

library(glmtlp)

set.seed(1234)
n <- 100
p <- 300
rho <- 0.3
kappa0 <- 10
# snr = 17 ensures that sigma is about 1 as absolute noise level
gau_data <- gen_gaussian_data(n, p, rho, kappa0, beta_type = 2, snr = 17)

fit_raw <- glmtlp(
    gau_data$X, gau_data$y, family = "gaussian",
    method = "tlp-constrained", kappa = 40
)

selection <- which(abs(fit_raw$beta[, 2]) > 0) 
selection # none selected
chunlinli commented 1 year ago

I update a temporary fix to this issue. However, this is related to determining reasonable range of hyper-parameter--it needs more thorough investigation.