Learn R Programming

frailtypack (version 2.2-13)

additivePenal: Fit an Additive Frailty model using penalized likelihood estimation

Description

Fit an additive frailty model using penalized likelihood 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 hazards models 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 gamma 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:

$$\lambda_{ij}(t|u_i,v_i)=\lambda_0(t)exp(u_i+v_iX_{ij1}+\sum_{k=1}^{p}\beta_kX_{ijk})$$

$$u_i\sim\bold{\mathcal{N}}(0,\bold{\sigma^2}) \hspace{0.5cm} v_i\sim\bold{\mathcal{N}}(0,\bold{\tau^2})\hspace{0.5cm} \bold{cov}(u_i,v_i)=\bold{\rho\sigma\tau}$$

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, kappa1,
                 kappa2, maxit = 350)

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 required
data
a 'data.frame' in which to interpret the variables named in the '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? If so a search of the smoothing parameter using cross validation is done, with kappa1 as the seed. The cross validation is not implem
n.knots
integer giving the number of knots to use. Value required. 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 and 20.(See Note)
kappa1
positive smoothing parameter. The coefficient kappa of the integral of the squared second derivative of hazard function in the fit (penalized log likelihood). To obtain an initial value for kappa1 (or kappa2), a solut
kappa2
Positive smoothing parameter for the second stratum when data are stratified. See kappa1.
maxit
maximum number of iterations for the Marquardt algorithm. Default is 350

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 coefficients of the linear predictor, which multiply the columns of the model matrix.
  • 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?
  • 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 corresponding to each baseline function as components
  • lammatrix of hazard estimates at x1 times and confidence bands.
  • lam2the same value as lam for the second stratum
  • loglikPenalthe complete marginal penalized log-likelihood
  • 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 function
  • 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 functon)
  • survmatrix of baseline survival estimates at x1 times and confidence bands.
  • surv2the same value as surv for the the second stratum
  • tau2Variance for the random slope (the random effect associated to the treatment effect across trials)
  • typecharacter string specifying the type of censoring. Possible values are "right", "left", "counting", "interval", "interval2". The default is "right" or "counting" depending on whether the 'time2' argument is absent (not interval-censored data) or present (interval-censored data), respectively.
  • varHthe variance matrix of all parameters (Sigma2, Tau2, the regression coefficients and the spline coefficients).
  • 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"
  • x1vector of times where both survival and hazard function for the recurrent events are estimated. By default seq(0,max(time),length=99), where time is the vector of survival times.
  • x2see x1 value for the second stratum

Details

The estimated parameter are obtained by maximizing the penalized log-likelihood using the robust Marquardt algorithm (Marquardt,1963). The parameters are initialized with values obtained with Cox proportional hazard models. 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^{-6})$.="" 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.<="" p="">

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.

PARAMETERS LIMIT VALUES

As frailtypack is written in Fortran 77 some parameters had to be hard coded in. The default values of these parameters are, with the corresponding variable name in the fortran code between brackets.

maximum number of observations (ndatemax): 30000 maximum number of groups (ngmax): 1000 maximum number of subjects (nsujetmax): 20000 maximum number of parameters (npmax) :50 maximum number of covariates (nvarmax):50 maximum number of subgroups (nssgmax):5000 If these parameters are not large enough (an error message will let you know this), you need to reset them in additive.f and recompile.

References

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

print.additivePenal, plot.additivePenal, summary.additivePenal, cluster, slope, strata, Surv

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,kappa1=10000)


# It takes around 4 minutes to converge. Var1 is boolean as a treatment variable. #

  print(modAdd)
  summary(modAdd)
  plot(modAdd)

Run the code above in your browser using DataLab