anujkhare/iregnet

Inf limits?

Closed this issue · 0 comments

Hey @anujkhare I ran your code on the ovarian data set and I noticed that Inf limits make the solver silently fail:

data(ovarian)
X <- with(ovarian, cbind(age=age, residual.disease=resid.ds-1, treatment=rx-1, ecog.ps=ecog.ps-1))
y_l <- ovarian$futime
y_r <- ovarian$futime
y_r[ovarian$fustat == 0] <- Inf
y_surv <- log(cbind(y_l, y_r))
fit <- iregnet(X, y_surv, family="gaussian")

current result is

> fit$beta[, 1:7]
     [,1] [,2] [,3] [,4] [,5] [,6] [,7]
[1,]  NaN  Inf  Inf  Inf  Inf  Inf  Inf
[2,]  NaN    0    0    0    0    0    0
[3,]  NaN    0    0    0    0    0    0
[4,]  NaN    0    0    0    0    0    0
[5,]  NaN    0    0    0    0    0    0

two possible solutions:

  • stop with an error if there are any Inf values for the output.
  • treat Inf same as NA