frailty(x, distribution="gamma", ...)
frailty.gamma(x, sparse = (nclass > 5), theta, df, eps = 1e-05, method = c("em","aic", "df", "fixed"), ...)
frailty.gaussian(x, sparse = (nclass > 5), theta, df, method =c("reml","aic", "df", "fixed"), ...)
frailty.t(x, sparse = (nclass > 5), theta, df, eps = 1e-05, tdf = 5,method = c("aic", "df", "fixed"), ...)
gamma
,
gaussian
or t
distribution may be specified.
The routines frailty.gamma
,
frailty.gaussian
and
frailty.t
do the actual work.x
is larger
than this value, then a sparse matrix approximation is used.
The correct cutoff is still a matter of exploration: if the number ofmethod='fixed'
.method='df'
.
Only one of theta
or
df
should be specified.fixed
corresponds to a user-specified
value, and no iteration is done.
The df
selects the variance such that the
degreescoxph
or survreg
.
It's results are used internally.T Therneau, P Grambsch and VS Pankratz, Penalized survival models and frailty, J Computational and Graphical Statistics, 12:156-175, 2003.
frailty
plugs into the general penalized
modeling framework provided by the coxph
and survreg
routines.
This framework deals with likelihood, penalties, and degrees of freedom;
these aspects work well with either parent routine.Therneau, Grambsch, and Pankratz show how maximum likelihood estimation for
the Cox model with a gamma frailty can be accomplished using a general
penalized routine, and Ripatti and Palmgren work through a similar argument
for the Cox model with a gaussian frailty. Both of these are specific to
the Cox model.
Use of gamma/ml or gaussian/reml with
survreg
does not lead to valid results.
The extensible structure of the penalized methods is such that the penalty
function, such as frailty
or
pspine
, is completely separate from the modeling
routine. The strength of this is that a user can plug in any penalization
routine they choose. A weakness is that it is very difficult for the
modeling routine to know whether a sensible penalty routine has been
supplied.
Note that use of a frailty term implies a mixed effects model and use of a cluster term implies a GEE approach; these cannot be mixed.
The coxme
package has superseded
this method. It is faster, more stable, and more flexible.
# Random institutional effect
coxph(Surv(time, status) ~ age + frailty(inst, df=4), lung)
# Litter effects for the rats data
rfit2a <- survreg(Surv(time, status) ~ rx +
frailty.gaussian(litter, df=13, sparse=FALSE), rats )
rfit2b <- survreg(Surv(time, status) ~ rx +
frailty.gaussian(litter, df=13, sparse=TRUE), rats )
Run the code above in your browser using DataLab