Skip to content
Prev 313027 / 398503 Next

fitting a gamma frailty model (coxph)

I looked at your data:
 > table(x, cluster)
      1  2  3  4  5  6
   0  0 48  0 48 48  0
   1 48  0 48  0  0 48

Your covariate "x" is perfectly predicted by the cluster variable.
If you fit a fixed effects model:
   coxph(Surv(time, event) ~ factor(cluster) +x)

then the "x" variable is declared redundant.  When the variance of the random effect is
sufficiently large, the same happens in the gamma model when the variance is sufficiently 
large.  Your model approaches this limit, and the solution fails.  As mentioned in the 
manual page, the coxme function is now preferred.

Last, your particular error message is caused by an invalid value for "sparse".  I'll add 
a check to the program.
You likely want "sparse=10" to force non-sparse computation.

Terry Therneau
On 12/04/2012 05:00 AM, r-help-request at r-project.org wrote: