Description Usage Arguments Value References See Also Examples
Allows the fitting of proportional hazards survival models to possibly clustered data using Bayesian methods. The function follows a MCMC method to sample from the posterior distribution of the regression parameters, frailties, and parameters specifying the hazard and frailty distribution.
The baseline hazard and random effects density are modeled as convex combinations of a parametric component (for example, a gamma frailty, or a weibull baseline hazard) and a nonparametric component modeled as a penalized B-splines, with the penalty depending on either the integrated squared second derivative of the curve, or the sum of squared second differences in the spline parameters.
1 2 3 4 |
formula |
a formula object, similar to |
data |
a |
verbose |
an integer from 0 to 5 that determines the quantity of output
printed to the screen. Setting |
hazard |
a list containing parameters defining the baseline hazard, with the following optional components. For any component that is not set, the default is used.
|
frailty |
a list containing parameters defining the frailty density,
analogous to
|
control |
a list containing control parameters for the MCMC and optimization, with the following optional components. For any component that is not set, the default is used.
|
initial |
a list containing initial values for the chain. Not implemented and currently ignored. |
coda |
a logical variable indicating whether the |
usec |
a logical variable, determines whether fast C code should be
used. Defaults to |
... |
additional parameters (currently ignored). |
An object of class splinesurv
, with the following components
call |
the original call to the model-fitting function |
posterior.mean |
a list containing the posterior means of all parameters, with the following components
|
history |
a list containing the parameter history of the MCMC
iterations, with the following components, either as matrices or vectors of
length
If in the input, |
frailty |
a list analogous to |
hazard |
a list analogous to |
control |
a list analogous to |
E. Sharef, R. Strawderman, D. Ruppert, M. Cowen, and L. Halasyamani, “Bayesian adaptive B-spline estimation in proportional hazards frailty models”, Electron. J. Statist. Volume 4 (2010), 606-642
summary.splinesurv
, plot.splinesurv
, coxph
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## Generate a small survival data set:
s <- sim.sample(m = 10, Ji = rep(10, 10))
agdata <- s$agdata
## Run a (very) short MCMC chain
fit <- splinesurv(Surv(time, delta) ~ Z + cluster(i), data = agdata, control = list(maxiter = 50, burnin = 25))
## Run another chain, with a Weibull hazard and linear B-spline frailties
# with fixed knots.
fit2 <- splinesurv(Surv(time, delta) ~ Z + cluster(i), data = agdata, control = list(maxiter = 50, burnin = 25), hazard = list(type = "parametric", param.dist = "weibull"), frailty = list(type = "spline", spline.ord = 2, spline.adaptive = FALSE))
## View summaries and plots of the fits
summary(fit)
plot(fit, "all")
summary(fit2)
plot(fit2, "all")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.