[R] Random Coefficients using coxme

Powers, Mark Mark.Powers at illinois.gov
Thu Mar 30 18:36:45 CEST 2006

Hello, I was hoping someone could answer a question for me that may
either be statistical or script related.  I don't come from a statistics
background, so I am not positive if I am using the correct nomenclature
or even the correct procedure.  Is it possible to model "random
coefficients" in a mixed effects cox-regression using coxme from the
Kinship package?  For example, using lmer from the lme4 package, I can
model V1 and V2 as a fixed & random coefficient:

Mod1=lmer(y ~ V1 + V2 + V3 + V4 + (1 + V1 + V2|GROUP))

Can I do something like this, though correctly without getting the error
("Error in max(kindex) : object "kindex" not found")?

Mod2=coxme(Surv(YDAYS, Y) ~ V1 + V2 + V3 + V4, data=ds1, random=~1 + V1

The GROUP variable is a census tract, while V1 & V2 are individual-level
characteristics of people. Thanks in advance.

Mark Powers
mark.powers at illinois.gov

More information about the R-help mailing list