Learn R Programming

bayesSurv (version 2.4)

bayesBisurvreg: Population-averaged accelerated failure time model for bivariate, possibly doubly-interval-censored data. The error distribution is expressed as a~penalized bivariate normal mixture with high number of components (bivariate G-spline).

Description

A function to estimate a regression model with bivariate (possibly right-, left-, interval- or doubly-interval-censored) data. In the case of doubly interval censoring, different regression models can be specified for the onset and event times. The error density of the regression model is specified as a mixture of Bayesian G-splines (normal densities with equidistant means and constant variance matrices). This function performs an MCMC sampling from the posterior distribution of unknown quantities.

For details, see Komárek (2006) and Komárek and Lesaffre (2006). We explain first in more detail a model without doubly censoring. Let $T_{i,l},\; i=1,\dots, N,\; l=1, 2$ be event times for $i$th cluster and the first and the second unit. The following regression model is assumed: $$\log(T_{i,l}) = \beta'x_{i,l} + \varepsilon_{i,l},\quad i=1,\dots,N,\;l=1,2$$ where $\beta$ is unknown regression parameter vector and $x_{i,l}$ is a vector of covariates. The bivariate error terms $\varepsilon_i=(\varepsilon_{i,1},\,\varepsilon_{i,2})',\;i=1,\dots,N$ are assumed to be i.i.d. with a~bivariate density $g_{\varepsilon}(e_1,\,e_2)$. This density is expressed as a~mixture of Bayesian G-splines (normal densities with equidistant means and constant variance matrices). We distinguish two, theoretically equivalent, specifications.

[object Object],[object Object] Personally, I found Specification 2 performing better. In the paper Komárek and Lesaffre (2006) only Specification 2 is described.

The mixture weights $w_{j_1,j_2},\;j_1=-K_1,\dots, K_1,\;j_2=-K_2,\dots, K_2$ are not estimated directly. To avoid the constraints $0 < w_{j_1,j_2} < 1$ and $\sum_{j_1=-K_1}^{K_1}\sum_{j_2=-K_2}^{K_2}w_{j_1,j_2} = 1$ transformed weights $a_{j_1,j_2},\;j_1=-K_1,\dots, K_1,\;j_2=-K_2,\dots, K_2$ related to the original weights by the logistic transformation: $$a_{j_1,j_2} = \frac{\exp(w_{j_1,j_2})}{\sum_{m_1}\sum_{m_2}\exp(w_{m_1,m_2})}$$ are estimated instead.

A~Bayesian model is set up for all unknown parameters. For more details I refer to Komárek and Lesaffre (2006) and to Komárek (2006).

If there are doubly-censored data the model of the same type as above can be specified for both the onset time and the time-to-event.

Usage

bayesBisurvreg(formula, formula2, data = parent.frame(),
   na.action = na.fail, onlyX = FALSE,
   nsimul = list(niter = 10, nthin = 1, nburn = 0, nwrite = 10),
   prior, prior.beta, init = list(iter = 0),
   mcmc.par = list(type.update.a = "slice", k.overrelax.a = 1,
                   k.overrelax.sigma = 1, k.overrelax.scale = 1),
   prior2, prior.beta2, init2,
   mcmc.par2 = list(type.update.a = "slice", k.overrelax.a = 1,
                    k.overrelax.sigma = 1, k.overrelax.scale = 1),
   store = list(a = FALSE, a2 = FALSE, y = FALSE, y2 = FALSE,
                r = FALSE, r2 = FALSE),
   dir = getwd())

Arguments

formula
model formula for the regression. In the case of doubly-censored data, this is the model formula for the onset time. Data are assumed to be sorted according to subjects and within subjects according to the types of the events that determine th
formula2
model formula for the regression of the time-to-event in the case of doubly-censored data. Ignored otherwise. The same remark as for formula concerning the sort order applies here.
data
optional data frame in which to interpret the variables occuring in the formulas.
na.action
the user is discouraged from changing the default value na.fail.
onlyX
if TRUE no MCMC sampling is performed and only the design matrix (matrices) are returned. This can be useful to set up correctly priors for regression parameters in the presence of factor covariates.
nsimul
a list giving the number of iterations of the MCMC and other parameters of the simulation. [object Object],[object Object],[object Object],[object Object]
prior
a~list specifying the prior distribution of the G-spline defining the distribution of the error term in the regression model given by formula. See prior argument of bayesHi
prior.beta
prior specification for the regression parameters, in the case of doubly censored data for the regression parameters of the onset time. I.e. it is related to formula. This should be a~list with the following components: [
init
an~optional list with initial values for the MCMC related to the model given by formula. The list can have the following components: [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[obje
mcmc.par
a~list specifying how some of the G-spline parameters related to formula are to be updated. The list can have the following components (all of them have their default values): [object Object],[object Object],[object Object],[objec
prior2
a~list specifying the prior distribution of the G-spline defining the distribution of the error term in the regression model given by formula2. See prior argument of bayesH
prior.beta2
prior specification for the regression parameters of time-to-event in the case of doubly censored data (related to formula2). This should be a~list with the same structure as prior.beta.
init2
an~optional list with initial values for the MCMC related to the model given by formula2. The list has the same structure as init.
mcmc.par2
a~list specifying how some of the G-spline parameters related to formula2 are to be updated. The list has the same structure as mcmc.par.
store
a~list of logical values specifying which chains that are not stored by default are to be stored. The list can have the following components. [object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
dir
a string that specifies a directory where all sampled values are to be stored.

Value

  • A list of class bayesBisurvreg containing an information concerning the initial values and prior choices.

References

Gilks, W. R. and Wild, P. (1992). Adaptive rejection sampling for Gibbs sampling. Applied Statistics, 41, 337 - 348.

Komárek, A. (2006). Accelerated Failure Time Models for Multivariate Interval-Censored Data with Flexible Distributional Assumptions. PhD. Thesis, Katholieke Universiteit Leuven, Faculteit Wetenschappen.

Komárek, A. and Lesaffre, E. (2006). Bayesian semi-parametric accelerated failure time model for paired doubly interval-censored data. Statistical Modelling, 6, 3--22. Neal, R. M. (2003). Slice sampling (with Discussion). The Annals of Statistics, 31, 705 - 767.

Examples

Run this code
## See the description of R commands for
## the population averaged AFT model
## with the Signal Tandmobiel data,
## analysis described in Komarek and Lesaffre (2006),
##
## R commands available in the documentation
## directory of this package as
## - see ex-tandmobPA.R and
##   http://www.karlin.mff.cuni.cz/~komarek/software/bayesSurv/ex-tandmobPA.pdf
##

Run the code above in your browser using DataLab