Learn R Programming

mhazard (version 0.1.2)

plotKM2.HM: Uses a heat map to visualize a bivariate survival function

Description

Plots a heat map of an estimated bivariate survival function. This function is a wrapper for the image function with default parameters chosen to make the data easier to visualize.

Usage

plotKM2.HM(
  km2.obj,
  contour = TRUE,
  col = terrain.colors(100),
  xlab = "T1",
  ylab = "T2",
  ...
)

Arguments

km2.obj

Output of the KM2 function.

contour

Should contour lines be added to the plot? Defaults to TRUE.

col

List of colors for the heat map. Defaults to terrain.colors(100).

xlab

The x-axis label. Defaults to "T1".

ylab

The y-axis label. Defaults to "T2".

...

Additional parameters to the image function.

See Also

KM2, image

Examples

Run this code
# NOT RUN {
x <- genClayton2(1000, 0, 1, 1, 2, 2)
x.km2 <- KM2(x$Y1, x$Y2, x$Delta1, x$Delta2)
plotKM2.HM(x.km2)

x2 <- genClayton2(1000, 2, 1, 1, 2, 2)
x2.km2 <- KM2(x2$Y1, x2$Y2, x2$Delta1, x2$Delta2)
plotKM2.HM(x2.km2)
# }

Run the code above in your browser using DataLab