Firstly, either the function bayesBisurvreg
or the
function bayessurvreg2
or the function bayessurvreg3
has to be used to obtain a sample from the posterior distribution of unknown quantities.
Function predictive2.control
serves only to perform some input
checks inside the main function predictive2
.
predictive2(formula, random, obs.dim, time0, data = parent.frame(),
grid, na.action = na.fail, Gspline,
quantile = c(0, 0.025, 0.5, 0.975, 1),
skip = 0, by = 1, last.iter, nwrite,
only.aver = TRUE,
predict = list(density=FALSE, Surv=TRUE,
hazard=FALSE, cum.hazard=FALSE),
dir = getwd(), extens = "", extens.random="_b", version=0)predictive2Para(formula, random, obs.dim, time0, data = parent.frame(),
grid, na.action = na.fail, Gspline,
quantile = c(0, 0.025, 0.5, 0.975, 1),
skip = 0, by = 1, last.iter, nwrite,
only.aver = TRUE,
predict = list(density=FALSE, Surv=TRUE,
hazard=FALSE, cum.hazard=FALSE),
dir = getwd(), extens = "", extens.random="_b", version=0)
predictive2.control(predict, only.aver, quantile, obs.dim,
time0, Gspline, n)
bayesBisurvreg
or bayessurvreg2
random
statement as that one used to sample from the
posterior distribution of unknown quantities by the function
bayessurvreg2
or
bayesBisurvreg
). This vector has to be of the same
length as the number of covariate combinationsGspline$dim
giving the starting
time for the survival model. It does not have to be supplied if equal
to zero (usually).
This option is used to get hazard and density functions on the
original time scale in the casedata.frame
similar to that one used to obtain a sample from
the posterior distribution. In this new data.frame
, puttime0
.NA
s in the
data. The user is discouraged to change a default value
na.fail
.mixmoment.sim
.nwrite
th iteration count of
iterations change).TRUE
only posterior predictive mean is
computed for all quantities and no quantiles. The word of warning: with only.aver
set to FALSE
, all
quantities must be stored for all iterations of the MCMC to be able
bayessurvreg3
was used to generate the MCMC sample.This is an extension used to distinguish different sampled G-splines determining the distribution of the rand
bayes*survreg*
function the
chains used by bayesGspline
were created. Use the following:[object Object],[object Object],[object Object],[object Object]
predict
and only.aver
):A~matrix with as many columns as length(grid) and as many rows as the number of covariate combinations for which the predictive quantities were asked. One row per covariate combination.
The same structure as Surv
component of the list.
The same structure as Surv
component of the list.
The same structure as Surv
component of the list.
This is a list with as many components as the number of covariate combinations. One component per covariate combination.
Each component of this list is a~matrix with as many columns as
length(grid) and as many rows as the length of the argument
quantile
. Each row of this matrix gives values of one
quantile. The rows are also labeled by the probabilities (in %) of
the quantiles.
The same structure as quant.Surv
component of the list.
The same structure as quant.Surv
component of the list.
The same structure as quant.Surv
component of the list.
Komárek, A. and Lesaffre, E. (2008). Bayesian accelerated failure time model with multivariate doubly-interval-censored data and flexible distributional assumptions. Journal of the American Statistical Association, 103, 523--533.
Komárek, A. and Lesaffre, E. (2006). Bayesian semi-parametric accelerated failurew time model for paired doubly interval-censored data. Statistical Modelling, 6, 3--22. Komárek, A., Lesaffre, E., and Legrand, C. (2007). Baseline and treatment effect heterogeneity for survival times between centers using a random effects accelerated failure time model with flexible error distribution. Statistics in Medicine, 26, 5457--5472.
## See the description of R commands for
## the models described in
## Komarek (2006),
## Komarek and Lesaffre (2006),
## Komarek and Lesaffre (2008),
## Komarek, Lesaffre, and Legrand (2007).
##
## R commands available in the documentation
## directory of this package
## - ex-tandmobPA.R and
## http://www.karlin.mff.cuni.cz/~komarek/software/bayesSurv/ex-tandmobPA.pdf
## - ex-tandmobCS.R and
## http://www.karlin.mff.cuni.cz/~komarek/software/bayesSurv/ex-tandmobCS.pdf
## - ex-eortc.R and
## http://www.karlin.mff.cuni.cz/~komarek/software/bayesSurv/ex-eortc.pdf
Run the code above in your browser using DataLab