S4 class methods plotting sample MCF from data, estimated MCF, or estimated
baseline hazard rate function from a fitted model by using ggplot2
plotting system. The plots generated are thus able to be further customized
properly.
# S4 method for mcf.formula,missing
plot(
x,
y,
lty,
col,
legendName,
legendLevels,
conf.int = FALSE,
mark.time = FALSE,
addOrigin = FALSE,
...
)# S4 method for mcf.rateReg,missing
plot(x, y, conf.int = FALSE, lty, col, ...)
# S4 method for baseRate.rateReg,missing
plot(x, y, conf.int = FALSE, lty, col, ...)
# S4 method for mcfDiff,missing
plot(
x,
y,
lty,
col,
legendName,
legendLevels,
conf.int = TRUE,
addOrigin = FALSE,
...
)
A ggplot
object.
An object used to dispatch a method.
An argument that should be missing and ignored now. Its existence
is just for satisfying the definition of generaic function plot
in package graphics
for methods' dispatching.
An optional numeric vector indicating line types specified to different groups: 0 = blank, 1 = solid, 2 = dashed, 3 = dotted, 4 = dotdash, 5 = longdash, 6 = twodash.
An optional character vector indicating line colors specified to different groups.
An optional length-one charactor vector to specify the
name for grouping each unique row in newdata
, such as "gender"
for "male" and "female". The default value is generated from the
object
.
An optional charactor vector to specify the levels for
each unique row in newdata
, such as "treatment" and "control".
The default values are generated from the object
.
A logical value indicating whether to plot confidence
interval. The default value is FALSE
.
A logical value with default value FALSE
. If
TRUE
, each censoring time is marked by "+" on the MCF curves.
Otherwise, the censoring time would not be marked.
A logical value indicating whether the MCF curves start
from origin time. The default value is FALSE
.
Other arguments for further usage.
mcf
for estimation of MCF;
rateReg
for model fitting.
## See examples given in function mcf and rateReg.
Run the code above in your browser using DataLab