My problem in a nutshell:
I would like to do a lasso- regression in R on interval survival data with weights and there seems no package available which can handle lasso, interval survival data and weights.
I am supposed to do a variable selection with a new method called “priority- Lasso”. The R package “prioritylasso” is based on the “glmnet” package.
The data come from a special study design, called casecohort. In this method a random subsample is drawn from the whole dataset and all cases from the whole cohort are added. In order to perform a cox regression on this special dataset I use the Cox-Barlow-Method (https://www.sciencedirect.com/science/article/pii/S089543569900102X). An R function for this method has already been implemented (not as package, but it is available for me). I won't go in details here, but the important thing is, that it creates a new dataset with weights, interval survival times and the subcohortcases twice in it (Thus + cluster(id)). The end of this function looks as follows:
formula.Barlow = formula(paste("Surv(t_0,t, case) ~ ",paste(co.vars.names, collapse = " + "), " + cluster(id)", sep = "")) fit.barlow = coxph(formula=formula.Barlow, weights=weights, data=tmp) return(fit.barlow)
When I take this adjusted dataset for the prioritylasso function I get the following error:
Error: Cox model requires a matrix with columns 'time' (>0) and 'status' (binary) as a response; a 'Surv' object suffices
The "glmnet" package cannot handle the interval survival data. So I tried "penalized", "lars", "hdnom" and also specific packages for interval survival data such as "coxinterval".
I have been looking for days now and I didn't find anything which can help!
So if someone has experience with variable selection and the Cox-Barlow-Method, I would be happy for ANY hints!