Fits a Weibull model with Gamma frailties for multivariate survival data under maximum likelihood
weibull.frailty(formula = formula(data), data = parent.frame(),
id = "id", subset, na.action, init, control = list())
an object of class weibull.frailty
with components:
a list with the estimated coefficients values. The components of this list are: betas
, scale
, shape
,
and var.frailty
, and correspond to the coefficients with the same name.
the hessian matrix at convergence. For the shape, scale, and var-frailty parameters the Hessian is computed on the log scale.
the log-likelihood value.
a copy of the control
argument.
an object of class Surv
containing the observed event times and the censoring indicator.
the design matrix of the model.
a numeric vector specifying which event times belong to the same cluster.
the value of argument id
, if that was a character string.
the term component of the fitted model.
a copy of data
or the created model.frame
.
the matched call.
an object of class formula
: a symbolic description of the model to be fitted. The response must
be a survival object as returned by function Surv()
.
an optional data frame containing the variables specified in the model.
either a character string denoting a variable name in data
or a numeric vector specifying which event times belong to
the same cluster (e.g., hospital, patient, etc.).
an optional vector specifying a subset of observations to be used in the fitting process.
what to do with missing values.
a numeric vector of length \(p + 3\) of initial values. The first \(p\) elements should correspond to the regression coefficients for the covariates, and the last \(3\) to log-scale, log-shape, and log-frailty-variance, respectively. See Details.
a list of control values with components:
a character string indicating which optimizer to use; options are "optim" (default) and "nlminb".
the parscale
control argument for optim()
, or the scale
argument for
nlminb()
. It should be a numeric vector of length equal to the number of parameters. Default is 0.01
for all parameters.
the maximum number of iterations. Default is 500.
a character string indicating which type of numerical derivative to use to compute the Hessian matrix; options are "fd" denoting the forward difference approximation, and "cd" (default) denoting the central difference approximation.
tolerance value used in the numerical derivative method. Default is 1e-03.
Dimitris Rizopoulos d.rizopoulos@erasmusmc.nl
The fitted model is defined as follows: $$\lambda(t_i | \omega_i) = \lambda_0(t_i) \omega_i \exp(x_i^T \beta),$$ where \(i\) denotes the subject, \(\lambda(\cdot)\) denotes the hazard function, conditionally on the frailty \(\omega_i\), \(x_i\) is a vector of covariates with corresponding regression coefficients \(\beta\), and \(\lambda_0(\cdot)\) is the Weibull baseline hazard defined as \(\lambda_0(t) = shape * scale * t^{shape -1}\). Finally, for the frailties we assume \(\omega_i \sim Gamma(\eta, \eta)\), with \(\eta^{-1}\) denoting the unknown variance of \(\omega_i\)'s.
weibull.frailty(Surv(time, status) ~ age + sex, kidney)
Run the code above in your browser using DataLab