[R] Predict in glmnet for cox family

jitvis jitvi648 at student.liu.se
Sun Apr 19 10:18:13 CEST 2015

Dear All, 

I am in some difficulty with predicting 'expected time of survival' for each
observation for a glmnet cox family with LASSO. 

I have two dataset 50000 * 450 (obs * Var) and 8000 * 450 (obs * var), I
considered first one as train and second one as test. 

I got the predict output and I am bit lost here,   

pre <- predict(fit,type="response", newx =selectedVar[1:20,]) 

1  0.9454985 
2  0.6684135                   
3  0.5941740 
4  0.5241938 
5  0.5376783 

This is the output I am getting - I understood with type "response" gives
the fitted relative-risk for "cox" family. 

I would like to know how I can convert it or change the fitted relative-risk
to 'expected time of survival' ? 

Any help would be great, thanks for all your time and effort.


View this message in context: http://r.789695.n4.nabble.com/Predict-in-glmnet-for-cox-family-tp4706070.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list