Plot Mean Cumulative Function (MCF)

Share:

Description

S4 class methods plotting sample MCF from data or estimated MCF from a fitted model by using ggplot2 plotting system. The plots generated are able to be further customized properly.

Usage

1
2
3
4
5
6
## S4 method for signature 'sampleMcf,missing'
plot(x, y, conf.int = FALSE,
     mark.time = FALSE, lty, col, legendName, legendLevels, ...)

## S4 method for signature 'rateRegMcf,missing'
plot(x, y, conf.int = FALSE, lty, col, ...)

Arguments

x

An object used to dispatch a method.

y

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.

conf.int

A logical value indicating whether to plot confidence interval. The default value is FALSE.

mark.time

A logical value with default FALSE. If TRUE, each censoring time is marked by "+" on the MCF curves. Otherwise, the censoring time would not be marked.

lty

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.

col

An optional character vector indicating line colors specified to different groups.

legendName

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.

legendLevels

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.

...

Other arguments for further usage.

Value

A ggplot object.

See Also

mcf for estimation of MCF; rateReg for model fitting.

Examples

1
## See examples given in function mcf and rateReg.