Learn R Programming

frailtypack (version 2.7.1)

additivePenal: Fit an Additive Frailty model using a semiparametric penalized likelihood estimation or a parametric estimation

Description

Fit an additive frailty model using a semiparametric penalized likelihood estimation or a parametric estimation. The main issue in a meta-analysis study is how to take into account the heterogeneity between trials and between the treatment effects across trials. Additive models are proportional hazard model with two correlated random trial effects that act either multiplicatively on the hazard function or in interaction with the treatment, which allows studying for instance meta-analysis or multicentric datasets. Right-censored data are allowed, but not the left-truncated data. A stratified analysis is possible (maximum number of strata = 2). This approach is different from the shared frailty models. In an additive model, the hazard function for the $j^{th}$ subject in the $i^{th}$ trial with random trial effect $u_i$ as well as the random treatment-by-trial interaction $v_i$ is: $$\left{ \begin{array}{ll} \lambda_{ij}(t|u_i,v_i)=\lambda_0(t)exp(u_i+v_iX_{ij1}+\sum_{k=1}^{p}\beta_kX_{ijk}) \ \bold{cov}(u_i,v_i)=\bold{\rho\sigma\tau} \ u_i\sim\bold{\mathcal{N}}(0,\bold{\sigma^2}) \mbox{,} v_i\sim\bold{\mathcal{N}}(0,\bold{\tau^2}) \end{array} \right.$$ where $\lambda_0(t)$ is the baseline hazard function, $\beta_k$ the fixed effect associated to the covariate $X_{ijk}$ (k=1,..,p), $\beta_1$ is the treatment effect and $X_{ij1}$ the treatment variable. $\rho$ is the corresponding correlation coefficient for the two frailty terms.

Usage

additivePenal(formula, data, correlation = FALSE, recurrentAG =
             FALSE, cross.validation = FALSE, n.knots, kappa,
             maxit = 350, hazard = "Splines", nb.int,
             LIMparam = 1e-4, LIMlogl = 1e-4, LIMderiv = 1e-3,
             print.times = TRUE)

Arguments

formula
a formula object, with the response 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. The slope() function is requir
data
a 'data.frame' with the variables used in 'formula'.
correlation
Logical value. Are the random effects correlated? If so, the correlation coefficient is estimated. The default is FALSE.
recurrentAG
Always FALSE for additive models (left-truncated data are not allowed).
cross.validation
Logical value. Is cross validation procedure used for estimating smoothing parameter in the penalized likelihood estimation? If so a search of the smoothing parameter using cross validation is done, with kappa as the seed.
n.knots
integer giving the number of knots to use. Value required in the penalized likelihood estimation. It corresponds to the (n.knots+2) splines functions for the approximation of the hazard or the survival functions. Number of knots must be between 4
kappa
positive smoothing parameter in the penalized likelihood estimation. In a stratified additive model, this argument must be a vector with kappas for both strata. The coefficient kappa of the integral of the squared second derivative of hazard funct
maxit
maximum number of iterations for the Marquardt algorithm. Default is 350
hazard
Type of hazard functions: "Splines" for semiparametric hazard functions with the penalized likelihood estimation, "Piecewise-per" for piecewise constant hazards functions using percentile, "Piecewise-equi" for piecewise constant hazard functions using equ
nb.int
Number of intervals (between 1 and 20) for the parametric hazard functions ("Piecewise-per", "Piecewise-equi").
LIMparam
Convergence threshold of the Marquard algorithm for the parameters (see Details), $10^{-4}$ by default.
LIMlogl
Convergence threshold of the Marquard algorithm for the log-likelihood (see Details), $10^{-4}$ by default.
LIMderiv
Convergence threshold of the Marquard algorithm for the gradient (see Details), $10^{-3}$ by default.
print.times
a logical parameter to print iteration process. Default is TRUE.

Value

  • An additive model or more generally an object of class 'additivePenal'. Methods defined for 'additivePenal' objects are provided for print, plot and summary.
  • bsequence of the corresponding estimation of the splines coefficients, the random effects variances and the regression coefficients.
  • callThe code used for fitting the model.
  • coefthe regression coefficients.
  • covcovariance between the two frailty terms $(\bold{cov}(u_i,v_i))$
  • cross.ValLogical value. Is cross validation procedure used for estimating the smoothing parameters in the penalized likelihood estimation?
  • correlationLogical value. Are the random effects correlated?
  • DoFdegrees of freedom associated with the "kappa".
  • formulathe formula part of the code used for the model.
  • groupsthe maximum number of groups used in the fit.
  • kappaA vector with the smoothing parameters in the penalized likelihood estimation corresponding to each baseline function as components.
  • loglikPenalthe complete marginal penalized log-likelihood in the semiparametric case.
  • loglikthe marginal log-likelihood in the parametric case.
  • nthe number of observations used in the fit.
  • n.eventsthe number of events observed in the fit.
  • n.iternumber of iterations needed to converge.
  • n.knotsnumber of knots for estimating the baseline functions.
  • n.stratnumber of stratum.
  • rhothe corresponding correlation coefficient for the two frailty terms.
  • sigma2Variance for the random intercept (the random effect associated to the baseline hazard functions).
  • tau2Variance for the random slope (the random effect associated to the treatment effect across trials).
  • varHthe variance matrix of all parameters before positivity constraint transformation (Sigma2, Tau2, the regression coefficients and the spline coefficients). Then after, the delta method is needed to obtain the estimated variance parameters.
  • varHIHthe robust estimation of the variance matrix of all parameters (Sigma2, Tau2, the regression coefficients and the spline coefficients).
  • varSigma2The variance of the estimates of "sigma2".
  • varTau2The variance of the estimates of "tau2".
  • varcovVariance of the estimates of "cov".
  • xmatrix of times where both survival and hazard functions are estimated. By default seq(0,max(time),length=99), where time is the vector of survival times.
  • lamarray (dim=3) of hazard estimates and confidence bands.
  • survarray (dim=3) of baseline survival estimates and confidence bands.
  • type.of.hazardType of hazard functions (0:"Splines", "1:Piecewise", "2:Weibull").
  • type.of.PiecewiseType of Piecewise hazard functions (1:"percentile", 0:"equidistant").
  • nbintervRNumber of intervals (between 1 and 20) for the parametric hazard functions ("Piecewise-per", "Piecewise-equi").
  • nparnumber of parameters.
  • nvarnumber of explanatory variables.
  • noVarindicator of explanatory variable.
  • LCVthe approximated likelihood cross-validation criterion in the semiparametric 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 parametric case.$$AIC=\frac{1}{n}(np - l(.))$$
  • n.knots.tempinitial value for the number of knots.
  • shape.weibshape parameter for the weibull hazard function.
  • scale.weibscale parameter for the weibull hazard function.
  • martingale.resmartingale residuals for each cluster.
  • frailty.predempirical Bayes prediction of the first frailty term.
  • frailty.pred2empirical Bayes prediction of the second frailty term.
  • linear.predlinear predictor: uses simply "Beta'X + u_i + v_i * X_1" in the additive Frailty models.
  • global_chisqa vector with the values of each multivariate Wald test.
  • dof_chisqa vector with the degree of freedom for each multivariate Wald test.
  • global_chisq.testa binary variable equals to 0 when no multivariate Wald is given, 1 otherwise.
  • p.global_chisqa vector with the p_values for each global multivariate Wald test.
  • names.factorNames of the "as.factor" variables.
  • Xlevelsvector of the values that factor might have taken.
  • contraststype of contrast for factor variable.

Details

The estimated parameter are obtained by maximizing the penalized log-likelihood or by a simple log-likelihood (in the parametric case) using the robust Marquardt algorithm (Marquardt,1963). The parameters are initialized with values obtained with Cox proportional hazard model. The iterations are stopped when the difference between two consecutive loglikelhoods was small $(<10^{-4})$, the="" estimated="" coefficients="" were="" stable="" (consecutive="" values="" $(<10^{-4})$,="" and="" gradient="" small="" enough="" $(<10^{-3})$.="" to="" be="" sure="" of="" having="" a="" positive="" function="" at="" all="" stages="" algorithm,="" spline="" reparametrized="" each="" stage.="" variance="" space="" two="" random="" effects="" is="" reduced,="" so="" variances="" are="" positive,="" correlation="" coefficient="" constrained="" between="" -1="" 1.="" marginal="" log-likelihood="" depends="" on="" integrations="" that="" approximated="" by="" using="" laplace="" integration="" technique="" with="" first="" order="" approximation.="" smoothing="" parameter="" can="" fixed="" or="" maximizing="" likelihood="" cross-validation="" criterion.="" usual="" squared="" wald="" statistic="" was="" modified="" mixture="" $\chi^2$="" distribution="" get="" significance="" test="" for="" effects.="" INITIAL VALUES The splines and the regression coefficients are initialized to 0.1. An adjusted Cox model is fitted, it provides new initial values for the splines coefficients and the regression coefficients. The variances of the frailties are initialized to 0.1. Then an additive frailty model with independent frailties is fitted. At last, an additive frailty model with correlated frailties is fitted.

References

V. Rondeau, Y. Mazroui and J. R. Gonzalez (2012). Frailtypack: An R package for the analysis of correlated survival data with frailty models using penalized likelihood estimation or parametric estimation. Journal of Statistical Software 47, 1-28. V. Rondeau, S. Michiels, B. Liquet, and J. P. Pignon (2008). Investigating trial and treatment heterogeneity in an individual patient data meta-analysis of survival data by mean of the maximum penalized likelihood approach. Statistics in Medecine, 27, 1894-1910.

See Also

slope

Examples

Run this code
###--- Additive model with 1 covariate ---###

data(dataAdditive)

modAdd <- additivePenal(Surv(t1,t2,event)~cluster(group)+
var1+slope(var1),correlation=TRUE,data=dataAdditive,
n.knots=8,kappa=10000)

#-- Var1 is boolean as a treatment variable

Run the code above in your browser using DataLab