[R] Re: [S] using Hmisc and Design library

array chip arrayprofile at yahoo.com
Wed Dec 15 01:27:33 CET 2004


actually data frame "b" has 177 rows, the script ran
ok on the first 166 rows as a subset, but started to
break down if subset of the first 177 rows were used
as the dataset, or the first 166 rows plus 168th row,
....

the data in those rows are:
    time status scores 
165  172      0 -123.3
166  105      0 -138.4
167  166      0 -128.8
168  140      0 -114.2
169  163      0 -117.0
170  141      0 -115.8

please advise!


--- array chip <arrayprofile at yahoo.com> wrote:

> Hi, I encountered a weird problem when using the
> Design and Hmisc problem. I have 2 data frame called
> "a" and "b", both have 3 columns: "time", "status"
> and
> "scores", a sample of the data frame is like:
> 
> data frame "a":
>   time status scores 
> 1   21      1  99.61
> 2   38      0 101.11
> 3   51      0 100.62
> 4   48      0  87.52
> 5   78      0  97.18
> 
> data frame "b":
>   time status scores 
> 1   27      0 -126.7
> 2   24      0 -135.6
> 3   30      0 -139.5
> 4   49      0 -137.6
> 5   27      0 -136.9
> 
> when I ran the following using data frame "a",
> everything is ok.
> 
> > library(Hmisc,T);library(Design,T)
> > dd <- datadist(a)
> > options(datadist='dd')
> > fit <- cph(Surv(time,status) ~ scores,
> data=a,surv=T, x=T, y=T)
> > fit
> Cox Proportional Hazards Model
> 
> cph(formula = Surv(time, status) ~ scores, data =
> data.combined.testing.set.scores, x = T, y = T,
> 	surv = T)
> 
>  Obs Events Model L.R. d.f.      P Score Score P   
> R2
> 
>   85     31       7.47    1 0.0063  7.21  0.0072
> 0.088
> 
> 
>          coef se(coef)    z       p 
> scores 0.0766   0.0287 2.67 0.00752
> 
> 
> but when I ran the same script using data frame "b",
> even though no error message was produced, no fit
> object was generated:
> 
> > rm(fit)
> > library(Hmisc,T);library(Design,T)
> > dd <- datadist(a)
> > options(datadist='dd')
> > fit <- cph(Surv(time,status) ~ scores,
> data=a,surv=T, x=T, y=T)
> > fit
> Problem: Object "fit" not found, while calling
> subroutine S_agsurv2 
> Use traceback() to see the call stack
> 
> can anyone tell me why? no missing value is present
> in
> either data frame.
> 
> Thanks
> 
> 
> __________________________________ 
>
--------------------------------------------------------------------
> This message was distributed by
> s-news at lists.biostat.wustl.edu.  To
> unsubscribe send e-mail to
> s-news-request at lists.biostat.wustl.edu with

> 



		
__________________________________ 

Dress up your holiday email, Hollywood style. Learn more.




More information about the R-help mailing list