Skip to content
Prev 164572 / 398506 Next

How to generate a prediction equation for a stratified survival model that was fitted by cph() in Design package

Dear Dr. Harrell,

Thanks for response so quickly. Here is example code to illustrate the
problem.
+               rep=TRUE, prob=c(.6, .4)))
surv=TRUE)
y=TRUE,surv=TRUE)
function(age = 48.800654,sex = "Male") {0.28612987-0.017321951*
age+0.00012586581*pmax(age-29.600456,0)^3-0.00046285671*pmax(age-44.2731
98,0)^3+0.00042111763*pmax(age-53.769262,0)^3-8.4126731e-05*pmax(age-69.
855597,0)^3-0.64448916*(sex=="Male") }
<environment: 0x02c2aef4>
Error in Nam[[i]] : subscript out of bounds

I am using Windows R ( version 2.6.0 2007-10-03).

Best regards,

Changhong Yu

-----Original Message-----
From: Frank E Harrell Jr [mailto:f.harrell at vanderbilt.edu] 
Sent: Thursday, December 11, 2008 6:58 PM
To: Yu, Changhong
Cc: r-help at r-project.org
Subject: Re: [R] How to generate a prediction equation for a stratified
survival model that was fitted by cph() in Design package
Yu, Changhong wrote:
generate
I
It is supposed to work for that case.  Please send trivial example code 
with data defined in the code that replicates the problem you are 
seeing, and I'll debug.

Frank
use\...{{dropped:13}}
http://www.R-project.org/posting-guide.html