Usage
## S3 method for class 'Uhaz':
plot(x, ...)
## S3 method for class 'uh':
plot(x, data, fn=c("haz","grad","surv","den","chaz"), ...)
plothazuh(h, add=FALSE, col="darkblue", lty=1, xlim, ylim,
lwd=2, pch=19, len=500, vert=FALSE, add.knots=TRUE,
xlab="Time", ylab="Hazard", ...)
plotchazuh(h, add=FALSE, lwd=2, len=500, col="darkblue",
pch=19, add.knots=TRUE, vert=FALSE, xlim, ylim, ...)
plotdenuh(h, add=FALSE, lty=1, lwd=2, col="darkblue",
add.knots=TRUE, pch=19, ylim, len=500, vert=FALSE, ...)
plotsurvuh(h, add=FALSE, lty=1, lwd=2, len=500, vert=FALSE,
col="darkblue", pch=19, add.knots=TRUE, xlim, ylim, ...)
plotgraduh(h, data, w=1, len=500, xlim, ylim, vert=TRUE,
add=FALSE, xlab="Time", ylab="Gradient",
col0="red3", col1="blue3", col2="green3", order=0, ...)
Arguments
x
an object of class Uhaz
, i.e., an output of function
Uhaz
, or an object of class uh
..
data
vector or matrix that stores observations, or an object of
class icendata
.
w
additional weights/multiplicities for the observations stored
in x
.
fn
function to be plotted. It can be = haz
, for hazard function;
= chaz
, for cumulative hazard function;
= den
, for density function;
= surv
, for survival function;
= gradien
xlim, ylim
numeric vectors of length 2, giving the x and y coordinates
ranges.
xlab, ylab
x- or y-axis labels.
add
= TRUE
, adds the curve to the existing plot; = FALSE
, plots the curve in a new one.
col
color used for plotting the curve.
lty
line type for plotting the curve.
lwd
line width for plotting the curve.
len
number of points used to plot a curve.
add.knots
logical, indicating if knots are also plotted.
pch
point character/type for plotting knots.
vert
logical, indicating if grey vertical lines are plotted to
show the interval that separates the two discrete measures.
col0
color for gradient function 0, i.e., for the
hazard-constant part, or alpha.
col1
color for gradient function 1, i.e., for the
hazard-decreasing part.
col2
color for gradient function 1, i.e., for the
hazard-increasing part.
order
= 0, the gradient functions are plotted; = 1, their first derivatives are plotted;
= 2, their second derivatives are plotted.
...
arguments for other graphical parameters (see par
).