Hi,

I am looking at the example which appears in this R page:

http://stat.ethz.ch/R-manual/R-devel...l/frailty.html

Here, in this particular example they fixed the degrees of freedom for the random institution effects to be 4.

But, how did they decide?

This clearly can't be the number of institutions as there are 19 institutions.

> length(unique(lung$inst))

[1] 19

But, how to decide what degrees of freedom to specify for your random institution effect? What was the reason they chose df=4?

I would have fixed the df=1, because I would assume the institutions to come from a common distribution (i.e. gamma) and I would loose a degree of freedom for estimating the variance of this random effect.

Is this df actually the degrees of freedom for random effects, or is it something like degrees of freedom fro smoothing splines?

Please join in the discussion and share your thoughts.