plot.splinesurv: Plots for splinesurv objects

Description Usage Arguments

Description

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.

Usage

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, ...)

Arguments

x

an object of type splinesurv.

which

a string specifying which plot to produce. Setting "hazard" plots the baseline hazard (default), "survival" plots the survivor function, "frailty" plots the frailty density, "coef" plots the posterior density of the coefficients. Setting "all" plots all plots at once.

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 NULL (default), the posterior means are used

plotknots

boolean indicating whether frailty spline knots should be plotted as vertical lines

fn

function to be applied to the posterior samples. Defaults to mean, but can be set to median or any other summary function.

marginal

string specifying whether to plot marginal survivor functions. If "none", conditional survivor functions are plotted. If "mc", marginal survivor functions are computed by Monte Carlo integration, and if "numerical", by numerical integration. Ignored if which is not "survival"

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 alpha=NULL omits bands.

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 plot


splinesurv documentation built on May 2, 2019, 4:57 p.m.