| plot.summary.sievePH {sievePH} | R Documentation |
Plotting Mark-Specific Proportional Hazards Model Fits
Description
plot method for class summary.sievePH and summary.kernel_sievePH. For univariate marks, it plots point and interval estimates of the mark-specific treatment effect parameter specified by contrast in summary.sievePH, and,
optionally, scatter/box plots of the observed mark values by treatment. For bivariate marks, plotting is restricted to the point estimate, which is displayed as a surface. No plotting is provided for marks of higher dimensions.
Usage
## S3 method for class 'summary.sievePH'
plot(
x,
mark = NULL,
tx = NULL,
xlim = NULL,
ylim = NULL,
zlim = NULL,
xtickAt = NULL,
xtickLab = NULL,
ytickAt = NULL,
ytickLab = NULL,
xlab = NULL,
ylab = NULL,
zlab = NULL,
txLab = c("Placebo", "Treatment"),
title = NULL,
...
)
Arguments
x |
an object returned by |
mark |
either a numeric vector specifying a univariate continuous mark or a data frame specifying a multivariate continuous mark.
For subjects with a right-censored time-to-event, the value(s) in |
tx |
a numeric vector indicating the treatment group (1 if treatment, 0 if placebo) |
xlim |
a numeric vector of length 2 specifying the x-axis range ( |
ylim |
a numeric vector of length 2 specifying the y-axis range ( |
zlim |
a numeric vector of length 2 specifying the z-axis range in a 3-dimensional plot ( |
xtickAt |
a numeric vector specifing the position of x-axis tickmarks ( |
xtickLab |
a numeric vector specifying labels for tickmarks listed in |
ytickAt |
a numeric vector specifing the position of y-axis tickmarks ( |
ytickLab |
a numeric vector specifying labels for tickmarks listed in |
xlab |
a character string specifying the x-axis label ( |
ylab |
a character string specifying the y-axis label ( |
zlab |
a character string specifying the z-axis label in a 3-dimensional plot ( |
txLab |
a character vector of length 2 specifying the placebo and treatment labels (in this order). The default labels are |
title |
a character string specifying the plot title ( |
... |
other arguments to be passed to plotting functions |
Details
For bivariate marks, markGrid in summary.sievePH must have equally spaced values for each component.
Value
None. The function is called solely for plot generation.
See Also
sievePH, sievePHipw, sievePHaipw and summary.sievePH
Examples
n <- 500
tx <- rep(0:1, each=n/2)
tm <- c(rexp(n/2, 0.2), rexp(n/2, 0.2 * exp(-0.4)))
cens <- runif(n, 0, 15)
eventTime <- pmin(tm, cens, 3)
eventInd <- as.numeric(tm <= pmin(cens, 3))
mark <- ifelse(eventInd==1, c(rbeta(n/2, 2, 5), rbeta(n/2, 2, 2)), NA)
markRng <- range(mark, na.rm=TRUE)
# fit a model with a univariate mark
fit <- sievePH(eventTime, eventInd, mark, tx)
sfit <- summary(fit, markGrid=seq(markRng[1], markRng[2], length.out=10))
plot(sfit, mark, tx)