Function to plot the the baseline hazard, frailty density, and
posterior density of regression parameters for objects of type
splinesurv
, with optional pointwise credible bands.
1 2 3 4 5 6 | ## S3 method for class 'splinesurv'
plot(x, which = c("hazard", "survival", "frailty", "coef", "all"),
newdata = NULL, iter=NULL, fn = mean, marginal = c("none", "mc", "numerical"),
plotknots = TRUE, npoints = 100, npost = 100, alpha = .05, legend = NULL,
lty = 1, col = 2, lwd = 2, lty.knots = 1, col.knots = 8, lwd.knots = 1, xlab = NULL,
ylab = NULL, main = NULL, xlim = NULL, ylim = NULL, tk = FALSE, ...)
|
x |
an object of type |
which |
a string specifying which plot to produce. Setting |
newdata |
a data frame in the same format as the original data containing data for prediction of the hazard or survival function. If it has more than one row, multiple functions will be plotted, but credible bands will not. |
iter |
integer, indicating which iteration of the MCMC chain to plot. If |
plotknots |
boolean indicating whether frailty spline knots should be plotted as vertical lines |
fn |
function to be applied to the posterior samples. Defaults to
|
marginal |
string specifying whether to plot marginal survivor functions.
If |
npoints |
number of points to be used for drawing |
npost |
number of samples from the posterior to be used for estimating the curve |
alpha |
level for plotting pointwise confidence bands. Setting
|
legend |
legend text, if desired |
lty |
line type for primary curve |
col |
color for primary curve |
lwd |
line width for primary curve |
lty.knots |
line type for knots |
col.knots |
color of the knot lines |
lwd.knots |
line width of the knot lines |
xlab |
x-axis label |
ylab |
y-axis label |
main |
main plot title |
xlim |
x-axis limits |
ylim |
y-axis limits |
tk |
boolean indicator whether to use the tkrplot GUI |
... |
additional parameters passed on to |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.