[R] using pre-calculated coefficients and LP in coxph()?
Dimitris Rizopoulos
d.rizopoulos at erasmusmc.nl
Sun Mar 13 18:32:10 CET 2011
probably you want to use the 'init' argument and 'iter.max'
control-argument of coxph(). For example, for the Lung dataset, we fix
the coefficients of age and ph.karno at 0.05 and -0.05, respectively:
library(survival)
coxph(Surv(time, status) ~ age + ph.karno, data = lung,
init = c(0.05, -0.05), iter.max = 0)
I hope it helps.
Best,
Dimitris
On 3/13/2011 6:08 PM, Angel Russo wrote:
> I need to force a coxph() function in R to use a pre-calculated set of beta
> coefficients of a gene signature consisting of xx genes and the gene
> expression is also provided of those xx genes.
>
> If I try to use "coxph()" function in R using just the gene expression data
> alone, the beta coefficients and coxph$linear.predictors will change and I
> need to use the pre-calcuated linear predictor not re-computed using coxph()
> function. The reason is I need to compute a quantity that uses as it's input
> the coxph() output but I need this output to be pre-calculated
> beta-coefficients and linear.predictor.
>
> Any one can show me how to do this in R?
>
> Thanks a lot.
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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.
>
--
Dimitris Rizopoulos
Assistant Professor
Department of Biostatistics
Erasmus University Medical Center
Address: PO Box 2040, 3000 CA Rotterdam, the Netherlands
Tel: +31/(0)10/7043478
Fax: +31/(0)10/7043014
Web: http://www.erasmusmc.nl/biostatistiek/
More information about the R-help
mailing list