predictive             package:bayesSurv             R Documentation

_C_o_m_p_u_t_e _p_r_e_d_i_c_t_i_v_e _q_u_a_n_t_i_t_i_e_s _b_a_s_e_d _o_n _a _B_a_y_e_s_i_a_n _s_u_r_v_i_v_a_l _r_e_g_r_e_s_s_i_o_n
_m_o_d_e_l _f_i_t_t_e_d _u_s_i_n_g _b_a_y_e_s_s_u_r_v_r_e_g_1 _f_u_n_c_t_i_o_n.

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

     This function runs additional McMC to compute predictive survivor
     and hazard curves and predictive event times for specified values
     of covariates.

     Firstly, the function 'bayessurvreg1' has to be used to obtain a
     sample from the posterior distribution of unknown quantities.

     Directly, posterior predictive quantiles and means of asked
     quantities are computed and stored in files.

     Function 'predictive.control' serves only to perform some input
     checks inside the main function 'predictive'.

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

     predictive(formula, random, time0 = 0, data = parent.frame(),
          grid, type = "mixture", subset, na.action = na.fail,
          quantile = c(0, 0.025, 0.5, 0.975, 1),                       
          skip = 0, by = 1, last.iter, nwrite, only.aver = FALSE,
          predict = list(Et=TRUE, t=FALSE, Surv=TRUE, hazard=FALSE, cum.hazard=FALSE),
          store = list(Et=TRUE, t = FALSE, Surv = FALSE, hazard = FALSE, cum.hazard=FALSE),
          Eb0.depend.mix = FALSE,
          dir = getwd(), toler.chol = 1e-10, toler.qr = 1e-10)

     predictive.control(predict, store, only.aver, quantile)

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

 formula: the same formula as that one used to sample from the
          posterior distribution of unknown quantities by the function
          'bayessurvreg1'.

  random: the same 'random' statement as that one used to sample from
          the posterior distribution of unknown quantities by the
          function 'bayessurvreg1'.

   time0: starting time for the survival model. This option is used to
          get correct hazard function in the case that the original
          model was log(T - time0) = ....

    data: optional data frame in which to interpret the variables
          occuring in the formulas. Usually, you create a new
          'data.frame' similar to that one used to obtain a sample from
          the posterior distribution. In this new 'data.frame', put
          covariate values equal to these for which predictive
          quantities are to be obtained. If 'cluster' statement was
          used, assign a unique cluster identification to each
          observation. Response variable and a censoring indicator may
          be set to arbitrary values. They are only used in 'formula'
          but are ignored for computation.

    grid: a list of length as number of observations in 'data' or a
          vector giving grids of values where predictive survivor
          functions, hazards, cumulative hazards are to be evaluated.
          If it is a vector, same grid is used for all observations
          from 'data'. Not needed if only 'predict$t' or 'predict$Et'
          are 'TRUE'. If 'time0' is different from zero your grid
          should start at 'time0' and not at zero.

    type: a character string giving the type of assumed error
          distribution. Currently, valid are substrings of "mixture".
          In the future, "spline", "polya.tree" might be also
          implemented.

  subset: subset of the observations from the 'data' to be used. This
          option will normally not be needed.

na.action: function to be used to handle any 'NA's in the data. The
          user is discouraged to change a default value 'na.fail'.

quantile: a vector of quantiles that are to be computed for each
          predictive quantity.

    skip: number of rows that should be skipped at the beginning of
          each *.sim file with the stored sample.

      by: additional thinning of the sample.

last.iter: index of the last row from *.sim files that should be used.
          If not specified than it is set to the maximum available
          determined according to the file 'mixmoment.sim'.

  nwrite: frequency with which is the user informed about the progress
          of computation (every 'nwrite'th iteration count of
          iterations change).

only.aver: if 'TRUE' only posterior predictive mean is computed for all
          quantities and no quantiles.

 predict: a list of logical values indicating which predictive
          quantities are to be sampled. Components of the list:

          _E_t predictive expectations of survivor times

          _t predictive survivor times

          _S_u_r_v predictive survivor functions

          _h_a_z_a_r_d predictive hazard functions

          _c_u_m._h_a_z_a_r_d predictive cumulative hazard functions

   store: a list of logical values indicating which predictive
          quantities are to be stored in files as `predET*.sim',
          `predT*.sim', `predS*.sim', `predhazard*.sim',
          `predcumhazard*.sim'. If you are interested only in posterior
          means or quantiles of the predictive quantities you do not
          have to store sampled values. Posterior means and quantiles
          are stored in files `quantET*.sim', `quantT*.sim',
          `quantS*.sim', `quanthazard*.sim', `quantpredhazard*.sim'.

Eb0.depend.mix: a logical value indicating whether the mean of the
          random intercept (if included in the model) was given in a
          hierarchical model as an overall mean of the mixture in the
          error term. With 'FALSE' (default) you have the same model as
          that one described in an accompanying paper. An ordinary user
          is discouraged from setting this to 'TRUE'.

     dir: a string giving a directory where previously simulated values
          were stored and where newly obtained quantities will be
          stored. On Unix, do not use `~/' to specify your home
          directory. A full path must be given, e.g. `/home/arnost/'.

toler.chol: tolerance for the Cholesky decomposition.

toler.qr: tolerance for the QR decomposition.

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

     An integer which should be equal to zero if everything ran fine.

_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 for correlated interval-censored data with a
     normal mixture as an error distribution. _Statistica Sinica_,
     *17*, 549-569.

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

     ## See the description of R commands for
     ## the models described in
     ## Komarek (2006),
     ## Komarek and Lesaffre (2007).
     ##
     ## R commands available
     ## in the documentation
     ## directory of this package as
     ## cgd.pdf, cgd.R
     ## tandmobMixture.pdf, tandmobMixture.R

