What you are doing is correct.  However‹ because it is not informed about
the penalty parameters used in creating the fit, the coxph command is not
able to correctly reconstruct the variance matrix; this is the source of all
of the ³singular² messages.  The confidence bands for the survival curves
will be incorrect (likely too wide), but the curves themselves are fine.

Terry Therneau


---- begin included message ----

Dear all,

I am using glmnet (Coxnet) for building a Cox Model and
to make actual prediction, i.e. to estimate the survival function S(t,Xn)
for a
new subject Xn. If I am not mistaken, glmnet (coxnet) returns beta, beta*X
and
exp(beta*X), which on its own cannot generate S(t,Xn). We miss baseline
survival function So(t).

Below is my code which takes beta coefficients from
glmnet and creates coxph object (iter=0, init=beta) in order to later
calculate
survival estimates with survfit.

I would be grateful if someone could confirm that my
solution with coxph object (iter=0, init=beta) is correct and that the
warning
I get 'X matrix deemed to be singular' when creating a coxph object is of no
concern. Below is my code which uses example from "Coxnet: Regularized Cox
Regression".

Thanks in advance.
DK
...

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to