bayessurvreg3           package:bayesSurv           R Documentation

_C_l_u_s_t_e_r-_s_p_e_c_i_f_i_c _a_c_c_e_l_e_r_a_t_e_d _f_a_i_l_u_r_e _t_i_m_e _m_o_d_e_l _f_o_r _m_u_l_t_i_v_a_r_i_a_t_e,
_p_o_s_s_i_b_l_y _d_o_u_b_l_y-_i_n_t_e_r_v_a_l-_c_e_n_s_o_r_e_d _d_a_t_a _w_i_t_h _f_l_e_x_i_b_l_y _s_p_e_c_i_f_i_e_d _r_a_n_d_o_m _e_f_f_e_c_t_s
_a_n_d/_o_r _e_r_r_o_r _d_i_s_t_r_i_b_u_t_i_o_n.

_D_e_s_c_r_i_p_t_i_o_n:

     A function to estimate a regression model with possibly clustered
     (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.

     A~univariate random effect (random intercept) with the
     distribution expressed as a~penalized normal mixture can be
     included in the model to adjust for clusters.

     The error density of the regression model is specified as a
     mixture of Bayesian G-splines (normal densities with equidistant
     means and constant variances). This function performs an MCMC
     sampling from the posterior distribution of unknown quantities.

     For details, see Kom&#225rek (2006) and Kom&#225rek and Lesaffre
     (2007).

     We explain first in more detail a model without doubly censoring.
     Let T[i,l], i=1,..., N, l=1,..., n[i] be event times for ith
     cluster and the units within that cluster The following regression
     model is assumed:

 log(T[i,l]) = beta'x[i,l] + b[i] + epsilon[i,l], i=1,..., N, l=1,..., n[i]

     where beta is unknown regression parameter vector, x[i,l] is a
     vector of covariates. b[i] is a cluster-specific random effect
     (random intercept).

     The random effects b[i], i=1,..., N are assumed to be i.i.d. with
     a~univariate density g[b](b). The error terms epsilon[i,l],
     i=1,..., N, l=1,..., n[i] are assumed to be i.i.d. with
     a~univariate density g[epsilon](e).

     Densities g[b] and g[epsilon] are both expressed as a~mixture of
     Bayesian G-splines (normal densities with equidistant means and
     constant variances). We distinguish two, theoretically equivalent,
     specifications.

     In the following, the density for epsilon is explicitely
     described. The density for b is obtained in an analogous manner.  

     _S_p_e_c_i_f_i_c_a_t_i_o_n _1 .DS B epsilon is distributed as sum[j=-K][K] w[j]
          N(mu[j], sigma^2) .DE

          where sigma^2 is the *unknown* basis variance and
          mu[j],;j=-K,..., K is an~equidistant grid of knots symmetric
          around the *unknown* point gamma  and related to the unknown
          basis variance through the relationship

              mu[j] = gamma + j*delta*sigma, j=K,..., K

          where delta is fixed constants, e.g. delta=2/3 (which has
          a~justification of being close to cubic B-splines).

          .DS B

          .DE


     _S_p_e_c_i_f_i_c_a_t_i_o_n _2 .DS B epsilon[1] is distributed as alpha + tau * V
          .DE

          where alpha is an *unknown* intercept term and tau is an
          *unknown* scale parameter. V is then standardized error term
          which is distributed according to the univariate normal
          mixture, i.e.

       V is distributed as sum[j=-K][K] w[j] N(mu[j], sigma^2)

          where mu[j], j=-K,..., K is an~equidistant grid of *fixed*
          knots (means), usually symmetric about the *fixed* point
          gamma = 0 and sigma^2 is *fixed* basis variance. Reasonable
          values for the numbers of grid points K is K=15 with the
          distance between the two knots equal to delta=0.3 and for the
          basis variance sigma^2=0.2^2. 

     Personally, I found Specification 2 performing better. In the
     paper Komarek and Lesaffre (2007) only Specification 2 is
     described.

     The mixture weights w[j], j=-K,..., K are not estimated directly.
     To avoid the constraints 0 < w[j] < 1 and sum[j=-K][K] w[j] = 1
     transformed weights a[j], j=-K,..., K related to the original
     weights by the logistic transformation:

                  a[j] = exp(w[j])/sum[m] exp(w[m])

     are estimated instead.

     A~Bayesian model is set up for all unknown parameters. For more
     details I refer to Komarek and Lesaffre (2007).

     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.

     In the case one wishes to link the random intercept of the onset
     model and the random intercept of the time-to-event model, there
     are the following possibilities.

     *Bivariate normal distribution* 
      It is assumed that the pair of random intercepts from the onset
     and time-to-event part of the model are normally distributed with
     zero mean and an unknown covariance matrix D.

     A priori, the inverse covariance matrix D^(-1) is addumed to
     follow a Wishart distribution.

     *Unknown correlation between the basis G-splines* 
      Each pair of basis G-splines describing the distribution of the
     random intercept in the onset part and the time-to-event part of
     the model is assumed to be correlated with an unknown correlation
     coefficient rho. Note that this is just an experiment and is no
     more further supported.

     Prior distribution on rho is assumed to be uniform. In the MCMC,
     the Fisher Z transform of the rho given by

              Z = -0.5*log((1-rho)/(1+rho)) = atanh(rho)

     is sampled. Its prior is derived from the uniform prior Unif(-1,
     1) put on rho.

     The Fisher Z transform is updated using the Metropolis-Hastings
     alhorithm. The proposal distribution is given either by a normal
     approximation obtained using the Taylor expansion of the full
     conditional distribution or by a Langevin proposal (see Robert and
     Casella, 2004, p. 318).

_U_s_a_g_e:

     bayessurvreg3(formula, random, formula2, random2,
        data = parent.frame(),
        na.action = na.fail, onlyX = FALSE,
        nsimul = list(niter = 10, nthin = 1, nburn = 0, nwrite = 10),   
        prior, prior.beta, prior.b, init = list(iter = 0),
        mcmc.par = list(type.update.a = "slice", k.overrelax.a = 1,
                        k.overrelax.sigma = 1, k.overrelax.scale = 1,
                        type.update.a.b = "slice", k.overrelax.a.b = 1,
                        k.overrelax.sigma.b = 1, k.overrelax.scale.b = 1),
        prior2, prior.beta2, prior.b2, init2,
        mcmc.par2 = list(type.update.a = "slice", k.overrelax.a = 1,
                         k.overrelax.sigma = 1, k.overrelax.scale = 1,
                        type.update.a.b = "slice", k.overrelax.a.b = 1,
                        k.overrelax.sigma.b = 1, k.overrelax.scale.b = 1),
        priorinit.Nb,
        rho = list(type.update = "fixed.zero", init=0, sigmaL=0.1),
        store = list(a = FALSE, a2 = FALSE, y = FALSE, y2 = FALSE,
                     r = FALSE, r2 = FALSE, b = FALSE, b2 = FALSE,
                     a.b = FALSE, a.b2 = FALSE, r.b = FALSE, r.b2 = FALSE), 
        dir = getwd())

_A_r_g_u_m_e_n_t_s:

 formula: model formula for the regression. In the case of
          doubly-censored data, this is the model formula for the onset
          time.

          The left-hand side of the 'formula' must be an~object created
          using 'Surv'.

          Intercept is implicitely included in the model by the
          estimation of the error distribution. As a~consequence '-1'
          in the model formula does not have any effect on the model
          specification.

          If 'random' is used then the formula must contain an
          identification of clusters in the form 'cluster(id)', where
          'id' is a name of the variable that determines clusters, e.g.

            'Surv(time, event)~gender + cluster(id)'.

  random: formula for the `random' part of the model. In the case of
          doubly-censored data, this is the 'random' formula for the
          onset time. With this version of the function only

            'random = ~1'

          is allowed. If omitted, no random part is included in the
          model.  

formula2: model formula for the regression of the time-to-event in the
          case of doubly-censored data. Ignored otherwise. The same
          structure as for 'formula' applies here. 

 random2: specification of the `random' part of the model for
          time-to-event in the case of doubly-censored data. Ignored
          otherwise. The same structure as for 'random' applies here. 

    data: optional data frame in which to interpret the variables
          occuring in the 'formula', 'formula2', 'random', 'random2'
          statements. 

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.

          _n_i_t_e_r total number of sampled values after discarding thinned
               ones, burn-up included;

          _n_t_h_i_n thinning interval;

          _n_b_u_r_n number of sampled values in a burn-up period after
               discarding thinned values. This value should be smaller
               than 'niter'. If not, 'nburn' is set to 'niter - 1'. It
               can be set to zero;

          _n_w_r_i_t_e an interval at which information about the number of
               performed iterations is print on the screen and during
               the burn-up period an interval with which the sampled
               values are writen to files;

   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' and 'random'. See 'prior' argument
          of 'bayesHistogram' function for more detail. In this list
          also 'Specification' as described above is specified.

          The item 'prior$neighbor.system' can only be equal to
          'uniCAR' here. 

 prior.b: a~list specifying the prior distribution of the G-spline
          defining the distribution of the random intercept in the
          regression model given by 'formula' and 'random'. See 'prior'
          argument of 'bayesHistogram' function for more detail. In
          this list also 'Specification' as described above is
          specified.

          It is ignored if the argument 'priorinit.Nb' is given.

          The item 'prior.b$neighbor.system' can only be equal to
          'uniCAR' here. 

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' and 'random'.

          This should be a~list with the following components:

          _m_e_a_n._p_r_i_o_r a~vector specifying a~prior mean for each 'beta'
               parameter in the model.

          _v_a_r._p_r_i_o_r a~vector specifying a~prior variance for each
               'beta' parameter.

          It is recommended to run the function bayessurvreg3 first
          with its argument 'onlyX' set to 'TRUE' to find out how the
          betas are sorted. They must correspond to a design matrix X
          taken from 'formula'. 

    init: an~optional list with initial values for the MCMC related to
          the model given by 'formula' and 'random'. The list can have
          the following components:

          _i_t_e_r the number of the iteration to which the initial values
               correspond, usually zero.

          _b_e_t_a a~vector of initial values for the regression
               parameters. It must be sorted in the same way as are the
               columns in the design matrix. Use 'onlyX=TRUE' if you do
               not know how the columns in the design matrix are
               created.

          _a a~vector of length 2*K+1 with the initial values of
               transformed mixture weights for the G-spline defining
               the distribution of the error term epsilon.

          _l_a_m_b_d_a initial values for the Markov random fields precision
               parameter for the G-spline defining the distribution of
               the error term epsilon. 

          _g_a_m_m_a an~initial values for the middle knot gamma for the
               G-spline defining the distribution of the error term
               epsilon.

               If 'Specification' is 2, this value will not be changed
               by the MCMC and it is recommended (for easier
               interpretation of the results) to set 'init$gamma' to
               zero (default behavior).

               If 'Specification' is 1 'init$gamma' should be
               approximately equal to the mean value of the residuals.

          _s_i_g_m_a an~initial values of the basis standard deviation sigma
               for the G-spline defining the distribution of the error
               term epsilon.

               If 'Specification' is 2, this value will not be changed
               by the MCMC and it is recommended to set it
               approximately equal to the range of standardized data
               (let say 4 + 4) divided by the number of knots and
               multiplied by something like 2/3.

               If 'Specification' is 1 this should be approximately
               equal to the range of the residuals divided by the
               number of knots (2*K+1) and multiplied again by
               something like 2/3. 

          _i_n_t_e_r_c_e_p_t an~initial values of the intercept term alpha for
               the G-spline defining the distribution of the error term
               epsilon.

               If 'Specification' is 1 this value is not changed by the
               MCMC and the initial value is always changed to zero.

          _s_c_a_l_e an~initial value of the scale parameter tau for the
               G-spline defining the distribution of the error term
               epsilon.

               If 'Specification' is 1 this value is not changed by the
               MCMC and the initial value is always changed to one.

          _a._b a~vector of length 2*K+1 with the initial values of
               transformed mixture weights for the G-spline defining
               the distribution of the random intercept b.

          _l_a_m_b_d_a._b initial values for the Markov random fields
               precision parameter for the G-spline defining the
               distribution of the random intercept b. 

          _g_a_m_m_a._b an~initial values for the middle knot gamma for the
               G-spline defining the distribution of the random
               intercept b.

               Due to identifiability reasons, this value is always
               changed to zero and is for neither 'Specification'
               updated by the MCMC.

          _s_i_g_m_a._b an~initial values of the basis standard deviation
               sigma for the G-spline defining the distribution of the
               random intercept b.

               If 'Specification' is 2, this value will not be changed
               by the MCMC and it is recommended to set it
               approximately equal to the range of standardized data
               (let say 4 + 4) divided by the number of knots and
               multiplied by something like 2/3.

               If 'Specification' is 1 this should be approximately
               equal to the range of the residuals divided by the
               number of knots (2*K+1) and multiplied again by
               something like 2/3. 

          _i_n_t_e_r_c_e_p_t._b an~initial values of the intercept term alpha for
               the G-spline defining the distribution of the random
               intercept b.

               Due to identifiability reasons, this value is always
               changed to zero and is for neither 'Specification'
               updated by the MCMC.

          _s_c_a_l_e._b an~initial value of the scale parameter tau for the
               G-spline defining the distribution of the random
               intercept b.

               If 'Specification' is 1 this value is not changed by the
               MCMC and the initial value is always changed to one.

          _b a vector of length N of the initial values of random
               effects b[i],;i=1,..., N for each cluster.

          _y a vector of length sum[i=1][N] n[i] with initial values of
               log-event-times.

          _r a vector of length sum[i=1][N] n[i] with initial component
               labels for each residual. All values must be between -K
               and K. See argument 'init' of the function
               'bayesHistogram' for more details.

          _r._b a~vector of length N with initial component labels for
               each random intercept. All values must be between -K and
               K. See argument 'init' of the function 'bayesHistogram'
               for more details.    

mcmc.par: a list specifying how some of the G-spline parameters related
          to the distribution of the error term and of the random
          intercept from 'formula' and 'random' are to be updated. See
          'bayesBisurvreg' for more details.

          Compared to the mcmc.par argument of the function
          'bayesBisurvreg' additional components related to the
          G-spline for the random intercept can be present, namely

            'type.update.a.b'
            'k.overrelax.a.b'
            'k.overrelax.sigma.b'
            'k.overrelax.scale.b'

          In contrast to 'bayesBisurvreg' function arguments
          'mcmc.par$type.update.a' and 'mcmc.par$type.update.a.b' can
          also be equal to '"block"' in which case all a coefficients
          are updated in 1 block using the Metropolis-Hastings
          algorithm.  

  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' and 'random2'. See 'prior' argument
          of 'bayesHistogram' function for more detail. 

prior.b2: prior specification for the parameters related to the random
          effects from 'formula2' and 'random2'. This should be a~list
          with the same structure as 'prior.b'.

          It is ignored if the argument 'priorinit.Nb' is given.     

prior.beta2: prior specification for the regression parameters of
          time-to-event in the case of doubly censored data (related to
          'formula2' and 'random2'). 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' and 'random2'. The list has the
          same structure as 'init'. 

mcmc.par2: a list specifying how some of the G-spline parameters
          related to 'formula2' and 'random2' are to be updated. The
          list has the same structure as 'mcmc.par'. 

priorinit.Nb: a list specifying the prior of the random intercepts in
          the case of the AFT model with doubly-interval-censored data
          and onset, time-to-event random intercepts following
          bivariate normal distribution.

          The list should have the following components.

          _i_n_i_t._D initial value for the covariance matrix of the onset
               random intercept and time-to-event random intercept.

               It can be specified either as a vector of length 3
               giving the lower triangle of the matrix or as a matrix 2
               x 2. 

          _d_f._D_i degrees of freedom nu for the Wishart prior of the
               matrix D^(-1).

               Note that it must be higher than 1.

          _s_c_a_l_e._D_i scale matrix S for the Wishart prior of the matrix
               D^(-1).

               It can be specified either as a vector of length 3
               giving the lower triangle of the matrix or as a matrix 2
               x 2.

               Note that a priori

                          E(D^{-1}) = nu*S.


     rho: a list specifying possible correlation between the onset
          random intercept and the time-to-event random intercept in
          the experimental version of the model. If not given
          correlation is fixed to 0.

          It is ignored if the argument 'priorinit.Nb' is given.
          Ordinary users should not care about this argument.

          The list can have the following components.

          _t_y_p_e._u_p_d_a_t_e character specifying how the Fisher Z transform
               of the correlation coefficient is updated. Possible
               values are:

               '"fixed.zero"': correlation coefficient is fixed to 0
               and it is not updated.

               '"normal.around.mode"': at each iteration of MCMC, 1
               Newton-Raphson step from the current point Z of the full
               conditional distribution is performed, normal
               approximation is formed by Taylor expansion and new
               point Z is sampled from that normal approximation.

               Note that this proposal does not work too well if the
               current point Z lies in the area of low posterior mass.
               The reason is that even 1 Newton-Raphson step usually
               leads to the area of high posterior probability mass and
               the proposal is ``too ambisious''.

               '"langevin"'. at each iteration of MCMC, new point Z is
               sampled using the Langevin algorithm. A scale parameter
               (see below) must cerefully be chosen for this algorithm
               to ensure that the acceptance rate is about 50-60%
               (Robert, Casella, 2004, p. 319). 

   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.

          _a if 'TRUE' then all the transformed mixture weights a[k],
               k=-K,..., K, related to the G-spline defining the error
               distribution of 'formula' are stored.

          _a._b if 'TRUE' then all the transformed mixture weights a[k],
               k=-K,..., K, related to the G-spline defining the
               distribution of the random intercept from 'formula' and
               'random' are stored.

          _a_2 if 'TRUE' and there are doubly-censored data then all the
               transformed mixture weights a[k], k=-K,..., K, related
               to the G-spline defining the error distribution of
               'formula2' are stored.

          _a._b_2 if 'TRUE' then all the transformed mixture weights a[k],
               k=-K,..., K, related to the G-spline defining the
               distribution of the random intercept from 'formula2' and
               'random2' are stored.      

          _y if 'TRUE' then augmented log-event times for all
               observations related to the 'formula' are stored.

          _y_2 if 'TRUE' then augmented log-event times for all
               observations related to 'formula2' are stored.

          _r if 'TRUE' then labels of mixture components for residuals
               related to 'formula' are stored.      

          _r._b if 'TRUE' then labels of mixture components for random
               intercepts related to 'formula' and 'random' are stored.                     

          _r_2 if 'TRUE' then labels of mixture components for residuals
               related to 'formula2' are stored.

          _r._b_2 if 'TRUE' then labels of mixture components for random
               intercepts related to 'formula2' and 'random2' are
               stored.            

          _b if 'TRUE' then the sampled values of the random interceptss
               related to 'formula' and 'random' are stored.

          _b_2 if 'TRUE' then the sampled values of the random
               interceptss related to 'formula2' and 'random2' are
               stored.

     dir: a string that specifies a directory where all sampled values
          are to be stored. 

_V_a_l_u_e:

     A list of class 'bayessurvreg3' containing an information
     concerning the initial values and prior choices.

_F_i_l_e_s _c_r_e_a_t_e_d:

     Additionally, the following files with sampled values are stored
     in a directory specified by 'dir' argument of this function (some
     of them are created only on request, see 'store' parameter of this
     function).

     Headers are written to all files created by default and to files
     asked by the user via the argument 'store'. During the burn-in,
     only every 'nsimul$nwrite' value is written. After the burn-in,
     all sampled values are written in files created by default and to
     files asked by the user via the argument 'store'. In the files for
     which the corresponding 'store' component is 'FALSE', every
     'nsimul$nwrite' value is written during the whole MCMC (this might
     be useful to restart the MCMC from some specific point).

     The following files are created:

     _i_t_e_r_a_t_i_o_n._s_i_m one column labeled 'iteration' with indeces of MCMC
          iterations to which the stored sampled values correspond.

     _m_i_x_m_o_m_e_n_t._s_i_m this file is related to the density of the error
          term from the model given by 'formula'.

          Columns labeled 'k', 'Mean.1',  'D.1.1', where

          *k* = number of mixture components that had probability
          numerically higher than zero;

          *Mean.1* = E(epsilon[i,l]);

          *D.1.1* = var(epsilon[i,l]).

     _m_i_x_m_o_m_e_n_t_{}_b._s_i_m this file is related to the density of the
          random intercept from the model given by 'formula' and
          'random'.

          The same structure as 'mixmoment.sim'.

     _m_i_x_m_o_m_e_n_t_{}_2._s_i_m in the case of doubly-censored data. This file
          is related to the density of the error term from the model
          given by 'formula2'.

          The same structure as 'mixmoment.sim'.

     _m_i_x_m_o_m_e_n_t_{}_b_2._s_i_m in the case of doubly-censored data. This file
          is related to the density of the random intercept from the
          model given by 'formula2' and 'random2'.

          The same structure as 'mixmoment.sim'. 

     _m_w_e_i_g_h_t._s_i_m this file is related to the density of the error term
          from the model given by 'formula'.

          Sampled mixture weights w[k] of mixture components that had
          probabilities numerically higher than zero. 

     _m_w_e_i_g_h_t_{}_b._s_i_m this file is related to the density of the random
          intercept from the model given by 'formula' and 'random'.

          The same structure as 'mweight.sim'.

     _m_w_e_i_g_h_t_{}_2._s_i_m in the case of doubly-censored data. This file is
          related to the density of the error term from the model given
          by 'formula2'.

          The same structure as 'mweight.sim'.

     _m_w_e_i_g_h_t_{}_b_2._s_i_m in the case of doubly-censored data. This file is
          related to the density of the random intercept from the model
          given by 'formula2' and 'random2'.

          The same structure as 'mweight.sim'. 

     _m_m_e_a_n._s_i_m this file is related to the density of the error term
          from the model given by 'formula'.

          Indeces k, k in {-K, ..., K} of mixture components that had
          probabilities numerically higher than zero. It corresponds to
          the weights in 'mweight.sim'. 

     _m_m_e_a_n_{}_b._s_i_m this file is related to the density of the random
          intercept from the model given by 'formula' and 'random'.

          The same structure as 'mmean.sim'.

     _m_m_e_a_n_{}_2._s_i_m in the case of doubly-censored data. This file is
          related to the density of the error term from the model given
          by 'formula2'.

          The same structure as 'mmean.sim'.

     _m_m_e_a_n_{}_b_2._s_i_m in the case of doubly-censored data. This file is
          related to the density of the random intercept from the model
          given by 'formula2' and 'random2'.

          The same structure as 'mmean.sim'. 

     _g_s_p_l_i_n_e._s_i_m this file is related to the density of the error term
          from the model given by 'formula'.

          Characteristics of the sampled G-spline. This file together
          with 'mixmoment.sim', 'mweight.sim' and 'mmean.sim' can be
          used to reconstruct the G-spline in each MCMC iteration.

          The file has columns labeled 'gamma1', 'sigma1', 'delta1',
          'intercept1',  'scale1', The meaning of the values in these
          columns is the following:

          *gamma1* = the middle knot gamma  If 'Specification' is 2,
          this column usually contains zeros;

          *sigma1* = basis standard deviation sigma of the G-spline.
          This column contains a~fixed value if 'Specification' is 2;

          *delta1* = distance delta between the two knots of the
          G-spline. This column contains a~fixed value if
          'Specification' is 2;

          *intercept1* = the intercept term alpha of the G-spline. If
          'Specification' is 1, this column usually contains zeros;

          *scale1* = the scale parameter tau of the G-spline. If
          'Specification' is 1, this column usually contains ones;

     _g_s_p_l_i_n_e_{}_b._s_i_m this file is related to the density of the random
          intercept from the model given by 'formula' and 'random'.

          The same structure as 'gspline.sim'.

     _g_s_p_l_i_n_e_{}_2._s_i_m in the case of doubly-censored data. This file is
          related to the density of the error term from the model given
          by 'formula2'.

          The same structure as 'gspline.sim'.

     _g_s_p_l_i_n_e_{}_b_2._s_i_m in the case of doubly-censored data. This file is
          related to the density of the random intercept from the model
          given by 'formula2' and 'random2'.

          The same structure as 'gspline.sim'. 

     _m_l_o_g_w_e_i_g_h_t._s_i_m this file is related to the density of the error
          term from the model given by 'formula'.

          Fully created only if 'store$a = TRUE'. The file contains the
          transformed weights a[k], k=-K,..., K of all mixture
          components, i.e. also of components that had numerically zero
          probabilities. 

     _m_l_o_g_w_e_i_g_h_t_{}_b._s_i_m this file is related to the density of the
          random intercept from the model given by 'formula' and
          'random'.

          Fully created only if 'store$a.b = TRUE'.

          The same structure as 'mlogweight.sim'.

     _m_l_o_g_w_e_i_g_h_t_{}_2._s_i_m in the case of doubly-censored data. This file
          is related to the density of the error term from the model
          given by 'formula2'.

          Fully created only if 'store$a2 = TRUE'.

          The same structure as 'mlogweight.sim'.

     _m_l_o_g_w_e_i_g_h_t_{}_b_2._s_i_m in the case of doubly-censored data. This file
          is related to the density of the random intercept from the
          model given by 'formula2' and 'random2'.

          Fully created only if 'store$a.b2 = TRUE'.

          The same structure as 'mlogweight.sim'. 

     _r._s_i_m this file is related to the density of the error term from
          the model given by 'formula'.

          Fully created only if 'store$r = TRUE'. The file contains the
          labels of the mixture components into which the residuals are
          intrinsically assigned. Instead of indeces on the scale
          {-K,..., K} values from 1 to (2*K+1) are stored here.
          Function 'vecr2matr' can be used to transform it back to
          indices from -K to K.

     _r_{}_b._s_i_m this file is related to the density of the random
          intercept from the model given by 'formula' and 'random'.

          Fully created only if 'store$r.b = TRUE'.

          The same structure as 'r.sim'.

     _r_{}_2._s_i_m in the case of doubly-censored data. This file is
          related to the density of the error term from the model given
          by 'formula2'.

          Fully created only if 'store$r2 = TRUE'.

          The same structure as 'r.sim'.

     _r_{}_b_2._s_i_m in the case of doubly-censored data. This file is
          related to the density of the random intercept from the model
          given by 'formula2' and 'random2'.

          Fully created only if 'store$r.b2 = TRUE'.

          The same structure as 'r.sim'. 

     _l_a_m_b_d_a._s_i_m this file is related to the density of the error term
          from the model given by 'formula'.

          One column labeled 'lambda'. These are the values of the
          smoothing parameterlambda (hyperparameters of the prior
          distribution of the transformed mixture weights a[k]). 

     _l_a_m_b_d_a_{}_b._s_i_m this file is related to the density of the random
          intercept from the model given by 'formula' and 'random'.

          The same structure as 'lambda.sim'.

     _l_a_m_b_d_a_{}_2._s_i_m in the case of doubly-censored data. This file is
          related to the density of the error term from the model given
          by 'formula2'.

          The same structure as 'lambda.sim'.

     _l_a_m_b_d_a_{}_b_2._s_i_m in the case of doubly-censored data. This file is
          related to the density of the random intercept from the model
          given by 'formula2' and 'random2'.

          The same structure as 'lambda.sim'. 

     _b_e_t_a._s_i_m this file is related to the model given by 'formula'.

          Sampled values of the regression parameters beta.

          The columns are labeled according to the 'colnames' of the
          design matrix.

     _b_e_t_a_{}_2._s_i_m in the case of doubly-censored data, the same
          structure as 'beta.sim', however related to the model given
          by 'formula2'. 

     _b._s_i_m this file is related to the model given by 'formula' and
          'random'.

          Fully created only if 'store$b = TRUE'. It contains sampled
          values of random intercepts for all clusters in the data set.
          The file has N columns.

     _b_{}_2._s_i_m fully created only if 'store$b2 = TRUE' and in the case
          of doubly-censored data, the same structure as 'b.sim',
          however related to the model given by 'formula2' and
          'random2'.  

     _Y._s_i_m this file is related to the model given by 'formula'.

          Fully created only if 'store$y = TRUE'. It contains sampled
          (augmented) log-event times for all observations in the data
          set.

     _Y_{}_2._s_i_m fully created only if 'store$y2 = TRUE' and in the case
          of doubly-censored data, the same structure as 'Y.sim',
          however related to the model given by 'formula2'. 

     _l_o_g_p_o_s_t_e_r._s_i_m This file is related to the residuals of the model
          given by 'formula'. 

          Columns labeled 'loglik', 'penalty', and 'logprw'.  The
          columns have the following meaning.

          *loglik* = -(sum[i=1][N] n[i]) * (log(sqrt(2*pi)) +
          log(sigma)) -0.5*sum[i=1][N] sum[l=1][n[i]](
          (sigma^2*tau^2)^(-1) * (y[i,l] - x[i,l]'beta - b[i] - alpha -
          tau*mu[r[i,l]])^2)

          where y[i,l] denotes (augmented) _(i,l)_th true log-event
          time.

          In other words, 'loglik' is equal to the conditional
          log-density

 sum[i=1][N] sum[l=1][n[i]] log(p(y[i,l] | r[i,l], beta, b[i], error-G-spline));

          *penalty:* the penalty term

                      -0.5*sum[k] (Delta a[k])^2

          (not multiplied by lambda);

          *logprw* = -2*(sum[i] n[i])*log(sum[k] exp(a[k])) + sum[k[1]]
          N[k]*a[k], where N[k] is the number of residuals assigned
          intrinsincally to the kth mixture component.

          In other words, 'logprw' is equal to the conditional
          log-density

 sum[i=1][N] sum[l=1][n[i]] log(p(r[i,l] | error-G-spline weights)).


     _l_o_g_p_o_s_t_e_r_{}_b._s_i_m This file is related to the random intercepts
          from the model given by 'formula' and 'random'. 

          Columns labeled 'loglik', 'penalty', and 'logprw'.  The
          columns have the following meaning.

          *loglik* = -N * (log(sqrt(2*pi)) + log(sigma))
          -0.5*sum[i=1][N]( (sigma^2*tau^2)^(-1) * (b[i] - alpha -
          tau*mu[r[i]])^2)

          where b[i] denotes (augmented) _i_th random intercept.

          In other words, 'loglik' is equal to the conditional
          log-density

             sum[i=1][N] log(p(b[i] | r[i], b-G-spline));

          The columns 'penalty' and 'logprw' have the analogous meaning
          as in the case of logposter.sim file.

     _l_o_g_p_o_s_t_e_r_{}_2._s_i_m in the case of doubly-censored data, the same
          structure as 'logposter.sim', however related to the model
          given by 'formula2'. 

     _l_o_g_p_o_s_t_e_r_{}_b_2._s_i_m in the case of doubly-censored data, the same
          structure as 'logposter_{}b.sim', however related to the
          model given by 'formula2' and 'random2'.

_A_u_t_h_o_r(_s):

     Arno&#353t Kom&#225rek komarek@karlin.mff.cuni.cz

_R_e_f_e_r_e_n_c_e_s:

     Kom&#225rek, A. (2006). _Accelerated Failure Time Models for
     Multivariate Interval-Censored Data with Flexible Distributional
     Assumptions_. PhD. Thesis, Katholieke Universiteit Leuven,
     Faculteit Wetenschappen.

     Kom&#225rek, A. and Lesaffre, E. (2007). Bayesian accelerated
     failure time model with multivariate doubly-interval-censored data
     and flexible distributional assumptions. _To appear in Journal of
     the American Statistical Association._

     Robert C. P. and Casella, G. (2004). _Monte Carlo Statistical
     Methods, Second Edition._ New York: Springer Science+Business
     Media.

_E_x_a_m_p_l_e_s:

     ## See the description of R commands for
     ## the cluster specific AFT model
     ## with the Signal Tandmobiel data,
     ## analysis described in Komarek and Lesaffre (2007).
     ##
     ## R commands available in the documentation
     ## directory of this package
     ## as tandmobCS.pdf, tandmobCS.R.

