Thanks very much Dimitrius and David.

I want to compute CPE using pre-calculated beta-model and linear.predictor
using the following code. I hope it the code is OK. Let me know. I am also
doing some sanity checks.

testc$x <- scores
testc$y <- Surv(testdata$time,testdata$status)
testfit <- coxph(y ~ x, testc, iter.max=0, init=1)
cpe=phcpe(testfit)

Thanks very much again.

-----

On Sun, Mar 13, 2011 at 2:28 PM, David Winsemius <dwinsem...@comcast.net>wrote:

>
> On Mar 13, 2011, at 1:32 PM, Dimitris Rizopoulos wrote:
>
>  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.
>>>
>>
> I would have guessed (and that is all one can do without an example and
> better description of what the setting and goal might be) that the use of
> the offset capablity in coxph might be needed.
>
> --
> David.
>
>
>>> 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.
>>>
>>
> David Winsemius, MD
> West Hartford, CT
>
>

        [[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