Learn R Programming

frailtypack (version 2.7.1)

multivPenal: Fit a multivariate frailty model for two types of recurrent events and a terminal event.

Description

Fit a multivariate frailty model for two types of recurrent events with a terminal event using a penalized likelihood estimation on the hazard function or a parametric estimation. Right-censored data are allowed. Left-truncated data and stratified analysis are not possible. Multivariate frailty models allow studying, with a joint model, three survival dependent processes for two types of recurrent events and a terminal event. Multivariate joint frailty models are applicable in mainly two settings. First, when focus is on the terminal event and we wish to account for the effect of previous endogenous recurrent event. Second, when focus is on a recurrent event and we wish to correct for informative censoring. The multivariate frailty model for two types of recurrent events with a terminal event is (in the calendar or time-to-event timescale): $$\left{ \begin{array}{lll} r_{i}^{(1)}(t|u_i,v_i) &= r_0^{(1)}(t)\exp({{\beta_1^{'}}}Z_{i}(t)+u_i) &\quad \mbox{(rec. of type 1)}\ r_{i}^{(2)}(t|u_i,v_i) &= r_0^{(2)}(t)\exp({{\beta_2^{'}}}Z_{i}(t)+v_i) &\quad \mbox{(rec. of type 2)}\ \lambda_i(t|u_i,v_i) &= \lambda_0(t)\exp({{\beta_3^{'}}}Z_{i}(t)+\alpha_1u_i+\alpha_2v_i) &\quad \mbox{(death)}\ \end{array} \right.$$ where $r_0^{(l)}(t)$, $l\in{1,2}$ and $\lambda_0(t)$ are respectively the recurrent and terminal event baseline hazard functions, and $\beta_1,\beta_2,\beta_3$ the regression coefficient vectors associated with $Z_{i}(t)$ the covariate vector. The covariates could be different for the different event hazard functions and may be time-dependent. We consider that death stops new occurrences of recurrent events of any type, hence given $t>D$, $dN^{R(l)*}(t), l\in{1,2}$ takes the value 0. Thus, the terminal and the two recurrent event processes are not independent or even conditional upon frailties and covariates. We consider the hazard functions of recurrent events among individuals still alive.The three components in the above multivariate frailty model are linked together by two Gaussian and correlated random effects $u_i,v_i$: $(u_i,v_i)^{T}\sim\mathcal{N}\left({{0}},\Sigma_{uv}\right)$, with $$\Sigma_{uv}=\left(\begin{array}{cc} \theta_1 & \rho\sqrt{\theta_1\theta_2} \ \rho\sqrt{\theta_1\theta_2}&\theta_2 \end{array}\right)$$ Dependencies between these three types of event are taken into account by two correlated random effects and parameters $\theta_1,\theta_2$ the variance of the random effects and $\alpha_1,\alpha_2$ the coefficients for these random effects into the terminal event part. If $\alpha_1$ and $\theta_1$ are both significantly different from 0, then the recurrent events of type 1 and death are significantly associated (the sign of the association is the sign of $\alpha_1$). If $\alpha_2$ and $\theta_2$ are both significantly different from 0, then the recurrent events of type 2 and death are significantly associated (the sign of the association is the sign of $\alpha_2$). If $\rho$, the correlation between the two random effects, is significantly different from 0, then the recurrent events of type 1 and the recurrent events of type 2 are significantly associated (the sign of the association is the sign of $\rho$).

Usage

multivPenal(formula, formula.Event2, formula.terminalEvent, data,
            initialize = TRUE, recurrentAG = FALSE, n.knots, kappa,
            maxit = 350, hazard = "Splines", nb.int, 
            print.times = TRUE)

Arguments

formula
a formula object, with the response for the first recurrent event on the left of a $\texttildelow$ operator, and the terms on the right. The response must be a survival object as returned by the 'Surv' function like in survival package.
formula.Event2
a formula object, with the response for the second recurrent event on the left of a $\texttildelow$ operator, and the terms on the right. The response must be a survival object as returned by the 'Surv' function like in survival package.
formula.terminalEvent
a formula object, with the response for the terminal event on the left of a $\texttildelow$ operator, and the terms on the right. The response must be a survival object as returned by the 'Surv' function like in survival package.
data
a 'data.frame' with the variables used in 'formula', 'formula.Event2' and 'formula.terminalEvent'.
initialize
Logical value to initialize regression coefficients and baseline hazard functions parameters. When the estimation is semi-parametric with splines, this initialization produces also values for smoothing parameters (by cross validation). When initialization
recurrentAG
Logical value. Is Andersen-Gill model fitted? If so indicates that recurrent event times with the counting process approach of Andersen and Gill is used. This formulation can be used for dealing with time-dependent covariates. The default is FALSE.
n.knots
integer vector of length 3 (for the three outcomes) giving the number of knots to use. First is for the recurrent of type 1, second is for the recurrent of type 2 and third is for the terminal event hazard function. Value required in the penalized likelih
kappa
vector of length 3 (for the three outcomes) for positive smoothing parameters in the penalized likelihood estimation. First is for the recurrent of type 1, second is for the recurrent of type 2 and third is for the terminal event hazard function. The coef
maxit
maximum number of iterations for the Marquardt algorithm. Default is 350.
hazard
Type of hazard functions: "Splines" for semi-parametrical hazard functions with the penalized likelihood estimation, "Piecewise-per" for piecewise constant hazard function using percentile, "Piecewise-equi" for piecewise constant hazard function using equ
nb.int
An integer vector of length 3 (for the three outcomes). First is the Number of intervals (between 1 and 20) for the recurrent of type 1 parametrical hazard functions ("Piecewise-per", "Piecewise-equi"). Second is the Number of intervals (between 1 and 20)
print.times
a logical parameter to print iteration process. Default is TRUE.

Value

  • Parameters estimates of a multivariate joint frailty model, more generally a 'fraityPenal' object. Methods defined for 'frailtyPenal' objects are provided for print, plot and summary. The following components are included in a 'multivPenal' object for multivariate Joint frailty models.
  • bsequence of the corresponding estimation of the splines coefficients, the random effects variances, the coefficients of the frailties and the regression coefficients.
  • callThe code used for fitting the model.
  • nthe number of observations used in the fit.
  • groupsthe number of subjects used in the fit.
  • n.eventsthe number of recurrent events of type 1 observed in the fit.
  • n.events2the number of the recurrent events of type 2 observed in the fit.
  • n.deathsthe number of deaths observed in the fit.
  • loglikPenalthe complete marginal penalized log-likelihood in the semi-parametrical case.
  • loglikthe marginal log-likelihood in the parametrical case.
  • LCVthe approximated likelihood cross-validation criterion in the semi parametrical case (with H minus the converged hessien matrix, and l(.) the full log-likelihood.$$LCV=\frac{1}{n}(trace(H^{-1}_{pl}H) - l(.))$$)
  • AICthe Akaike information Criterion for the parametrical case.$$AIC=\frac{1}{n}(np - l(.))$$
  • theta1variance of the frailty parameter for recurrences of type 1 $(\bold{Var}(u_i))$
  • theta2variance of the frailty parameter for recurrences of type 2 $(\bold{Var}(v_i))$
  • alpha1the coefficient associated with the frailty parameter $u_i$ in the terminal hazard function.
  • alpha2the coefficient associated with the frailty parameter $v_i$ in the terminal hazard function.
  • rhothe correlation coefficient between $u_i$ and $v_i$
  • nparnumber of parameters.
  • coefthe regression coefficients.
  • nvarA vector with the number of covariates of each type of hazard function as components.
  • varHthe variance matrix of all parameters before positivity constraint transformation (theta, the regression coefficients and the spline coefficients). Thenafter, the delta method is needed to obtain the estimated variance parameters.
  • varHIHthe robust estimation of the variance matrix of all parameters (theta, the regression coefficients and the spline coefficients).
  • formulathe formula part of the code used for the model for the recurrent event.
  • formula.Event2the formula part of the code used for the model for the second recurrent event.
  • formula.terminalEventthe formula part of the code used for the model for the terminal event.
  • x1vector of times for hazard functions of the recurrent events of type 1 are estimated. By default seq(0,max(time),length=99), where time is the vector of survival times.
  • lam1matrix of hazard estimates and confidence bands for recurrent events of type 1.
  • xSu1vector of times for the survival function of the recurrent event of type 1.
  • surv1matrix of baseline survival estimates and confidence bands for recurrent events of type 1.
  • x2vector of times for the recurrent event of type 2 (see x1 value).
  • lam2the same value as lam1 for the recurrent event of type 2.
  • xSu2vector of times for the survival function of the recurrent event of type 2
  • surv2the same value as surv1 for the recurrent event of type 2.
  • xEndvector of times for the terminal event (see x1 value).
  • lamEndthe same value as lam1 for the terminal event.
  • xSuEndvector of times for the survival function of the terminal event
  • survEndthe same value as surv1 for the terminal event.
  • type.of.PiecewiseType of Piecewise hazard functions (1:"percentile", 0:"equidistant").
  • n.iternumber of iterations needed to converge.
  • type.of.hazardType of hazard functions (0:"Splines", "1:Piecewise", "2:Weibull").
  • n.knotsa vector with number of knots for estimating the baseline functions.
  • kappaa vector with the smoothing parameters in the penalized likelihood estimation corresponding to each baseline function as components.
  • n.knots.tempinitial value for the number of knots.
  • zisplines knots.
  • timeknots for Piecewise hazard function for the recurrent event of type 1.
  • timedcknots for Piecewise hazard function for the terminal event.
  • time2knots for Piecewise hazard function for the recurrent event of type 2.
  • noVarindicator vector for reccurrent, death and recurrent 2 explanatory variables.
  • nvarRecnumber of the recurrent of type 1 explanatory variables.
  • nvarEndnumber of death explanatory variables.
  • nvarRec2number of the recurrent of type 2 explanatory variables.
  • nbintervRNumber of intervals (between 1 and 20) for the the recurrent of type 1 parametrical hazard functions ("Piecewise-per", "Piecewise-equi").
  • nbintervDCNumber of intervals (between 1 and 20) for the death parametrical hazard functions ("Piecewise-per", "Piecewise-equi").
  • nbintervR2Number of intervals (between 1 and 20) for the the recurrent of type 2 parametrical hazard functions ("Piecewise-per", "Piecewise-equi").
  • istopVector of the convergence criteria.
  • shape.weibshape parameters for the Weibull hazard function.
  • scale.weibscale parameters for the Weibull hazard function.
  • martingale.resmartingale residuals for each cluster (recurrent of type 1).
  • martingale2.resmartingale residuals for each cluster (recurrent of type 2).
  • martingaledeath.resmartingale residuals for each cluster (death).
  • frailty.predempirical Bayes prediction of the first frailty term.
  • frailty2.predempirical Bayes prediction of the second frailty term.
  • frailty.varvariance of the empirical Bayes prediction of the first frailty term.
  • frailty2.varvariance of the empirical Bayes prediction of the second frailty term.
  • frailty.corrCorrelation between the empirical Bayes prediction of the two frailty.
  • linear.predlinear predictor: uses Beta'X + ui in the multivariate frailty models.
  • linear2.predlinear predictor: uses Beta'X + vi in the multivariate frailty models.
  • lineardeath.predlinear predictor for the terminal part form the multivariate frailty models: Beta'X + alpha1 ui + alpha2 vi
  • global_chisqRecurrent event of type 1: a vector with the values of each multivariate Wald test.
  • dof_chisqRecurrent event of type 1: a vector with the degree of freedom for each multivariate Wald test.
  • global_chisq.testRecurrent event of type 1: a binary variable equals to 0 when no multivariate Wald is given, 1 otherwise.
  • p.global_chisqRecurrent event of type 1: a vector with the p-values for each global multivariate Wald test.
  • names.factorRecurrent event of type 1: Names of the "as.factor" variables.
  • global_chisq2Recurrent event of type 2: a vector with the values of each multivariate Wald test.
  • dof_chisq2Recurrent event of type 2: a vector with the degree of freedom for each multivariate Wald test.
  • global_chisq.test2Recurrent event of type 2: a binary variable equals to 0 when no multivariate Wald is given, 1 otherwise.
  • p.global_chisq2Recurrent event of type 2: a vector with the p_values for each global multivariate Wald test.
  • names.factor2Recurrent event of type 2: Names of the "as.factor" variables.
  • global_chisq_dTerminal event: a vector with the values of each multivariate Wald test.
  • dof_chisq_dTerminal event: a vector with the degree of freedom for each multivariate Wald test.
  • global_chisq.test_dTerminal event: a binary variable equals to 0 when no multivariate Wald is given, 1 otherwise.
  • p.global_chisq_dTerminal event: a vector with the p-values for each global multivariate Wald test.
  • names.factordcTerminal event: Names of the "as.factor" variables.

References

Mazroui Y., Mathoulin-Pellissier S., MacGrogan G., Brouste V., Rondeau V. (2013). Multivariate frailty models for two types of recurrent events with an informative terminal event : Application to breast cancer data. Biometrical journal, 55(6), 866-884.

See Also

terminal,event2, print.multivPenal,summary.multivPenal,plot.multivPenal

Examples

Run this code
###--- Multivariate Frailty model ---###

data(dataMultiv)

modMultiv.spli <- multivPenal(Surv(TIMEGAP,INDICREC)~cluster(PATIENT)+v1+v2+
             event2(INDICMETA)+terminal(INDICDEATH),formula.Event2=~v1+v2+v3,
             formula.terminalEvent=~v1,data=dataMultiv,n.knots=c(8,8,8),
             kappa=c(1,1,1),initialize=FALSE)

print(modMultiv.spli)

modMultiv.weib <- multivPenal(Surv(TIMEGAP,INDICREC)~cluster(PATIENT)+v1+v2+
             event2(INDICMETA)+terminal(INDICDEATH),formula.Event2=~v1+v2+v3,
             formula.terminalEvent=~v1,data=dataMultiv,hazard="Weibull")

print(modMultiv.weib)

modMultiv.cpm <- multivPenal(Surv(TIMEGAP,INDICREC)~cluster(PATIENT)+v1+v2+
             event2(INDICMETA)+terminal(INDICDEATH),formula.Event2=~v1+v2+v3,
             formula.terminalEvent=~v1,data=dataMultiv,hazard="Piecewise-per",
             nb.int=c(6,6,6))

print(modMultiv.cpm)

Run the code above in your browser using DataLab