Skip to content
Back to formatted view

Raw Message

Message-ID: <Pine.LNX.4.63a.0509131258070.29030@homer24.u.washington.edu>
Date: 2005-09-13T20:04:57Z
From: Thomas Lumley
Subject: coxph.detail() does not work
In-Reply-To: <6bfea57f050913123432025d49@mail.gmail.com>

On Tue, 13 Sep 2005, Zhen Zhang wrote:

> Hello everyone,
>
> I tried to use coxph.detail() to get the hazard function.  But a warning
> messge always returns to me, even in the example provided by its help
> document:
>
>> ?coxph.detail
>> fit   <- coxph(Surv(futime,fustat) ~ age + rx + ecog.ps, ovarian, x=TRUE)
>> fitd  <- coxph.detail(fit)
> Warning message:
> data length [37] is not a sub-multiple or multiple of the number of
> rows [12] in matrix
>
> Can anyone suggest why it does not work?
>

It does work. That's a warning, not an error.

If you want to know why the warning is there, it's because the code turns 
a 37-element vector into a 12x3 matrix. This drops the last element. In 
S-PLUS, and in some older versions of R, there is no warning, but in 
current R there is a warning.  The answer is the same, though.

 	-thomas