Re: [R] help with coxme

From: Spencer Graves <>
Date: Tue 04 Jul 2006 - 02:56:18 EST

          When I tried it, I seemed to get inconsistent results, the first of which was irreproducible. The first error message said that 'rats2' was not a data.frame. I don't know what I did to get that, but when I tried it again, I got the following:

Error in max(kindex) : object "kindex" not found

 > traceback()
3: max(kindex)
2: max(kindex)
1: coxme(Surv(time, status) ~ rx + x2, data = rats2, random = ~(1 +
        x2) | litter)

	  This sounds to me like a logic error in 'coxme';  I am therefore 
cc-ing the maintainer listed in help(package='kinship').

          If it were my problem, I might list coxme and make a local copy of it. It's easy to find the offending 'max(kindex)'. It's harder to figure out what kindex should be in this context. To attempt that, I might request debug(coxme), then try again the 'coxme' call that produced the error message and trace through it line by line until I figured it out.

	  Hope this helps.
	  Spencer Graves

Lei Liu wrote:
> Hi there,
> I have a question on fitting data by coxme. In particular I want to fit a
> random intercept and random slope cox model. Using the rats dataset as an
> example, I generated another covariate x2 and want to specify a random slope
> for x2. Here is my code:
> x2=matrix(rep(runif(50), 3), 50, 3)
> x2=as.vector(t(x2))
> rats2=cbind(rats, x2)
> But when I used the coxme function as follows, it gave an error message.
> What is the right way to do it? Thanks a lot!
> coxme(Surv(time, status) ~ rx+x2, data=rats2, random=~ (1+x2)|litter )
> Lei Liu
> Assistant Professor
> Division of Biostatistics and Epidemiology
> Dept. of Public Health Sciences
> School of Medicine
> University of Virginia
> 3181 Hospital West Complex
> Charlottesville, VA 22908-0717
> 1-434-982-3364 (o)
> 1-434-806-8086 (c)
> ______________________________________________
> mailing list
> PLEASE do read the posting guide! mailing list PLEASE do read the posting guide! Received on Tue Jul 04 03:00:57 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Tue 04 Jul 2006 - 04:14:42 EST.

Mailing list information is available at Please read the posting guide before posting to the list.