anujkhare / iregnet

7 stars 12 forks source link

error for invalid output intervals? #29

Closed tdhock closed 8 years ago

tdhock commented 8 years ago

Hey @anujkhare would it be possible to stop with an error when the upper limit is in less than the lower limit? For example

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-1
y_r[ovarian$fustat == 0] <- NA
y_surv <- log(cbind(y_l, y_r))
fit <- iregnet(X, y_surv, family="gaussian")

I see we have fit$error_status==1 but it would also be nice to stop with an error that tells the user that there is a problem with the outputs.