See Komárek (2006) or
Komárek and Lesaffre (2007)
for more detailed description of prior assumptions.
Sampled values are stored on a disk to be further worked out by e.g.
coda
or boa
.
bayessurvreg1(formula, random,
data = parent.frame(), subset,
na.action = na.fail,
x = FALSE, y = FALSE, onlyX = FALSE,
nsimul = list(niter = 10, nthin = 1, nburn = 0,
nnoadapt = 0, nwrite = 10),
prior = list(kmax = 5, k.prior = "poisson", poisson.k = 3,
dirichlet.w = 1,
mean.mu = NULL, var.mu = NULL,
shape.invsig2 = 1.5,
shape.hyper.invsig2 = 0.8, rate.hyper.invsig2 = NULL,
pi.split = NULL, pi.birth = NULL,
Eb0.depend.mix = FALSE),
prior.beta, prior.b, prop.revjump,
init = list(iter = 0, mixture = NULL, beta = NULL,
b = NULL, D = NULL,
y = NULL, r = NULL, otherp = NULL, u = NULL),
store = list(y = TRUE, r = TRUE, b = TRUE, u = TRUE,
MHb = FALSE, regresres = FALSE),
dir = getwd(),
toler.chol = 1e-10, toler.qr = 1e-10, ...)
survreg
for further details. Intercept is implicitely
included in the model by estimarandom=~1
. All effects mentionedNA
s in the
data. The user is discouraged to change a default value
na.fail
.TRUE
then the X
matrix is returned. This
matrix contain all columns appearing in both formula
and
random
parameters.TRUE
then the y
matrix (of log-survival
times) is returned.NULL
. Set to
NULL
such parameters that you want the program should itself sample
for you or parameters that are not needed in your model.
[object Object],[object Object],[object Object],[obeta.sim
),
a covariance matrix of random effects $D$ (stored
in a file D.sim<
bayessurvreg
containing an information
concerning the initial values and prior choices.Green, P. J. (1995). Reversible jump MCMC computation and Bayesian model determination. Biometrika, 82, 711-732.
Richardson, S., and Green, P. J. (1997). On Bayesian analysis of mixtures with unknown number of components (with Discussion). Journal of the Royal Statistical Society B, 59, 731 - 792.
## 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
## - ex-cgd.R and
## http://www.karlin.mff.cuni.cz/~komarek/software/bayesSurv/ex-cgd.pdf
##
## - ex-tandmobMixture.R and
## http://www.karlin.mff.cuni.cz/~komarek/software/bayesSurv/ex-tandmobMixture.pdf
##
Run the code above in your browser using DataLab