s-news
[Top] [All Lists]

cph() in Design package

To: s-news@lists.biostat.wustl.edu
Subject: cph() in Design package
From: array chip <arrayprofile@yahoo.com>
Date: Tue, 11 Apr 2006 11:11:03 -0700 (PDT)
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=jp8PgfB2/WA9JMEwVQrKkFzDyBSKXKyp93DHOiUMR4BjQfyI9G8Qv5aDkxGH5tnEoF3W7Lf9K6iGXgAvOtNjDQCrxVdOfplXOvEcwOc1qRaO3Rf6idsWFwc6DfSSeZ1Bf7Fco9cI6vh/ji/M3MenFpQKWdRHYZ5QstOneCfMe/w= ;
Hi there, I encountered a weird problem using cph()
with Design package in S-Plus:

I have 2 datasets, say "dat1" and "dat2", both data
frames with 3 columns "time","status" and "scores",
all numeric

If I run the following:
dd<-datadist(dat1)
options(datadist='dd')
dd

                 time status   scores 
     Low:effect  37.0      0   -6.018
      Adjust to  88.0      0   11.252
    High:effect 109.0      1   33.267
 Low:prediction  11.0      0  -34.419
High:prediction 147.5      1   88.218
            Low   5.0      0  -72.072
           High 171.0      1  154.678

fit <- cph(Surv(time,status) ~ scores,
data=dat1,surv=T, x=T, y=T)
fit

Cox Proportional Hazards Model

cph(formula = Surv(time, status) ~ scores, data = xx,
x = T, y = T, surv = T)

 Obs Events Model L.R. d.f.      P Score Score P    R2

 171     64      10.65    1 0.0011 12.01  0.0005 0.062

so everything is ok.

However, if I run the following with the second
dataset:

dd<-datadist(dat2)
options(datadist='dd')
dd

                  time status   scores 
     Low:effect  68.10      0  -16.036
      Adjust to  91.75      0    9.068
    High:effect 119.03      1   42.447
 Low:prediction  21.75      0  -48.103
High:prediction 120.00      1   96.661
            Low   6.90      0  -75.392
           High 120.00      1  141.524

fit <- cph(Surv(time,status) ~ scores,
data=dat2,surv=T, x=T, y=T)
fit

Problem: Object "fit" not found, while calling
subroutine S_agsurv2 
Use traceback() to see the call stack

traceback()
4: eval(action, sys.parent())
3: doErrorAction("Problem: Object \"fit\" not found,
while calling subroutine S_agsurv2", 1000)
2: eval(expression(fit))
1: 
Message: Problem: Object "fit" not found, while
calling subroutine S_agsurv2

so it didn't work with the second dataset. The 2
dataset is very similar in terms of column data type.

With the second dataset, I also tried subsets: cph()
worked until the first 106 rows and started to stop
working when the 107th row was added:

xx<-dat2[1:106,]
dd<-datadist(xx)
options(datadist='dd')
fit <- cph(Surv(time,status) ~ scores,
data=xx,surv=T, x=T, y=T)
fit

Cox Proportional Hazards Model

cph(formula = Surv(time, status) ~ scores, data = xx,
x = T, y = T, surv = T)

 Obs Events Model L.R. d.f.      P Score Score P    R2

 106     22      15.31    1 0.0001 17.92       0 0.159


        coef se(coef)    z        p 
scores 0.017  0.00418 4.07 0.000047

xx<-dat2[1:107,]
dd<-datadist(xx)
options(datadist='dd')
fit <- cph(Surv(time,status) ~ scores,
data=xx,surv=T, x=T, y=T)
fit

Problem: Object "fit" not found, while calling
subroutine S_agsurv2 
Use traceback() to see the call stack
 
The data between 105th and 107th rows are:

     time status scores 
105 104.4      0  32.48
106 109.1      0 -38.76
107  99.9      0  74.96

any suggestions?

Many thanks


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

<Prev in Thread] Current Thread [Next in Thread>
  • cph() in Design package, array chip <=