mhazard (version 0.1.2)

plotKM2.3D: Uses a 3D perspective plot to visualize a bivariate survival function

Description

Plots a 3D perspective plot of an estimated bivariate survival function. This function is a wrapper for the persp3D function from the plot3D package with default parameters chosen to make the data easier to visualize.

Usage

plotKM2.3D(
  km2.obj,
  col = "grey",
  shade = 0.25,
  theta = 120,
  xlab = "T1",
  ylab = "T2",
  zlab = "Fhat",
  ...
)

Arguments

km2.obj

Output of the KM2 function.

col

Color palette to be used for the plot. Defaults to "grey". See persp3D.

shade

The degree of shading of the surface facets. Defaults to 0.25. See persp.

theta

The azimuthal viewing direction. See persp.

xlab

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

ylab

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

zlab

The z-axis label. Defaults to "Fhat".

...

Additional parameters to the persp3D function.

See Also

KM2, persp3D

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)
# }
# NOT RUN {
plotKM2.3D(x.km2)
# }
# NOT RUN {
x2 <- genClayton2(1000, 2, 1, 1, 2, 2)
x2.km2 <- KM2(x2$Y1, x2$Y2, x2$Delta1, x2$Delta2)
# }
# NOT RUN {
plotKM2.3D(x2.km2)
# }

Run the code above in your browser using DataLab