frailty.fit {extrafrail} | R Documentation |
Fitted different shared frailty models
Description
frailty.fit computes the maximum likelihood estimates based on the EM algorithm for the shared gamma, inverse gaussian, weighted Lindley, Birnbaum-Saunders, truncated normal and mixture of inverse gaussian frailty models.
Usage
frailty.fit(formula, data, dist.frail="gamma", dist = "np", prec = 1e-04,
max.iter = 1000, part=NULL)
Arguments
formula |
A formula that contains on the left hand side an object of the type Surv and on the right hand side a +cluster(id) statement, possibly with the covariates definition. |
data |
A data.frame in which the formula argument can be evaluated |
dist.frail |
the distribution assumed for the frailty. Supported values: gamma (GA also is valid), IG (inverse gaussian), WL (weighted Lindley), BS (Birnbaum-Saunders), TN (truncated normal) and MIG (mixture of IG). |
dist |
the distribution assumed for the basal model. Supported values: weibull, pe (piecewise exponential), exponential and np (non-parametric). |
prec |
The convergence tolerance for parameters. |
max.iter |
The maximum number of iterations. |
part |
partition time (only for piecewise exponential distribution). |
Details
For the weibull, exponential and piecewise exponential distributions as the basal model, the M1-step is performed using the optim function. For the non-parametric case, the M1-step is based on the coxph function from the survival package.
Value
an object of class "extrafrail" is returned. The object returned for this functions is a list containing the following components:
coefficients |
A named vector of coefficients |
se |
A named vector of the standard errors for the estimated coefficients. |
t |
The vector of times. |
delta |
The failure indicators. |
id |
A variable indicating the cluster which belongs each observation. |
x |
The regressor matrix based on cov.formula (without intercept term). |
dist |
The distribution assumed for the basal model. |
dist.frail |
The distribution assumed for the frailty variable. |
tau |
The Kendall's tau coefficient. |
logLik |
The log-likelihood function (only when the Weibull model is specified for the basal distribution). |
Lambda0 |
The observed times and the associated cumulative hazard function (only when the non-parametric option is specified for the basal distribution) |
part |
the partition time (only for piecewise exponential model). |
Author(s)
Diego Gallardo and Marcelo Bourguignon.
References
Gallardo, D.I., Bourguignon, M. (2022) The shared weighted Lindley frailty model for cluster failure time data. Submitted.
Examples
require(survival)
#require(frailtyHL)
data(rats, package="frailtyHL")
#Fit for WL frailty model
fit.WL <- frailty.fit(survival::Surv(time, status)~ rx+ survival::cluster(litter),
dist.frail="WL", data = rats)
summary(fit.WL)
#Fit for gamma frailty model
fit.GA <- frailty.fit(survival::Surv(time, status) ~ rx + survival::cluster(litter),
dist.frail="gamma", data = rats)
summary(fit.GA)